C
CNN
I'm really new to the whole macro business so I really need help. I'm trying
to create a macro to solve this equation
D =(Sum from 1 to Nt ((X - Xmean)^2/Nt))^0.5 ......I hope it's clear. I
don't know hope to format here.
Anyway, I have a range of Xs that are Nt in number and Nt is unknown so it
will have to be found first and this has to be in the code. I'm trying to
avoid having another column containing the values of (X - Xt)^2/Nt. I just
want D to be displayed in a designated cell, like F2. This code will be used
for multiple workbooks, all the data always on sheet 1 and Nt always a
different value. All the ways I could think of involved having the extra
column.
I would really appreciate any help. All I have so far is
Sub Macro2()
Dim LR As Long
Dim Mean
Dim Total
Dim i As Long
LR = .Range("A" & .Rows.Count).End(xlUp).Row
Mean = Average("A2:LR")
Total = 0
For i = 2 To LR
and I don't even understand the principle behind the LR code.
Thank you and sorry if I was long winded.
to create a macro to solve this equation
D =(Sum from 1 to Nt ((X - Xmean)^2/Nt))^0.5 ......I hope it's clear. I
don't know hope to format here.
Anyway, I have a range of Xs that are Nt in number and Nt is unknown so it
will have to be found first and this has to be in the code. I'm trying to
avoid having another column containing the values of (X - Xt)^2/Nt. I just
want D to be displayed in a designated cell, like F2. This code will be used
for multiple workbooks, all the data always on sheet 1 and Nt always a
different value. All the ways I could think of involved having the extra
column.
I would really appreciate any help. All I have so far is
Sub Macro2()
Dim LR As Long
Dim Mean
Dim Total
Dim i As Long
LR = .Range("A" & .Rows.Count).End(xlUp).Row
Mean = Average("A2:LR")
Total = 0
For i = 2 To LR
and I don't even understand the principle behind the LR code.
Thank you and sorry if I was long winded.