Subset 1 : A1:H1
Subset 2 :A2:H2 , etc
Sub M_snb() sn = Cells(1).CurrentRegion.Resize(, Cells(1).CurrentRegion.Columns.Count + 1) For j = 1 To UBound(sn) For jj = 1 To UBound(sn, 2) - 1 sn(j, UBound(sn, 2)) = sn(j, UBound(sn, 2)) + sn(j, jj) Next sn(j, UBound(sn, 2)) = sn(j, UBound(sn, 2)) / (jj - 1) x = 0 n = 0 For jj = 1 To UBound(sn, 2) - 1 If sn(j, jj) <> "" Then x = x + (sn(j, jj) - sn(j, UBound(sn, 2))) ^ 2 n = n + Abs(sn(j, jj) = "") Next y = y + Sqr(x / (jj - n - 2)) c00 = c00 & vbLf & Sqr(x / (jj - n - 2)) Next MsgBox c00 & vbLf & vbLf & y / UBound(sn) End Sub




Reply With Quote
