Werner hat recht. Als erstes solltest Du die letzte Spalte Variabel ermitteln.
Die Formeln und das Schreiben der Werte habe ich dann in eine Schleife integriert. In diesem Fall würden jeweils die Werte für alle Spalten berechnet und eingetragen.
Option Explicit
'Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Private Sub xyz()
Dim Spalte As Long
Dim i As Long
Dim lngEZ As Long
Dim lngLZ As Long
Dim dblOG As Double
Dim dblUG As Double
Dim dblMittelwert As Double
Dim dblStandardabweichung As Double
Dim dblMaximal As Double
Dim dblMinimal As Double
Dim dblSpannweite As Double
Dim dblcm As Double
Dim dblcmo As Double
Dim dblcmu As Double
Dim dblcmk As Double
'letzte verwendete Spalte ermitteln
Spalte = Cells(1, Columns.Count).End(xlToLeft).Column
'Spalte einfügen
Range(Cells(1, Spalte + 1), Cells(1, Spalte + 1)).EntireColumn.Insert
'Leerzelle in Spalte B finden
lngEZ = Cells(10, Spalte).End(xlDown).Row + 2
lngLZ = Cells(Rows.Count, Spalte).End(xlUp).Row
'Berechnung der Variablen
dblOG = Cells(3, Spalte).Value
dblUG = Cells(4, Spalte).Value
dblMittelwert = Application.Average(Range(Cells(lngEZ, Spalte), Cells(lngLZ, Spalte)))
dblStandardabweichung = Application.StDev(Range(Cells(1, Spalte), Cells(lngLZ, Spalte)))
dblMaximal = Application.Max(Range(Cells(lngEZ, Spalte), Cells(lngLZ, Spalte)))
dblMinimal = Application.Min(Range(Cells(lngEZ, Spalte), Cells(lngLZ, Spalte)))
dblSpannweite = dblMaximal - dblMinimal
dblcm = ((dblOG - dblUG) / (6 * dblStandardabweichung))
dblcmo = ((dblOG - dblMittelwert) / (3 * dblStandardabweichung))
dblcmu = ((dblMittelwert - dblUG) / (3 * dblStandardabweichung))
dblcmk = Application.Min(dblcmo, dblcmu)
'In in schreiben der Variablen
For i = 2 To Spalte
'Cells(5, Spalte).Value = dblMittelwert
Cells(6, Spalte).Value = dblStandardabweichung
Cells(7, Spalte).Value = dblMaximal
Cells(8, Spalte).Value = dblMinimal
Cells(9, Spalte).Value = dblSpannweite
Cells(10, Spalte).Value = dblcm
Cells(11, Spalte).Value = dblcmk
Next i
End Sub
Ich hoffe das hilft.
Viele Grüße
Kai