I am trying to calculate average and SD from data which has different start points on a worksheet. The data is in column I and the first set starts at I2 and varies where it finishes. The second set starts 6 rows below where the first set ends.
Cells(2,16).Value = Worksheetfunction.Average(Range("I2:I"&NewEnd))
Cells(3,16).Value = Worksheetfunction.StDev(Range("I2:I"&NewEnd))
These two lines work fine
Cells(2,17).Value = Worksheetfunction.Average(Range("I" &RwStart&":I"&NewEnd2))
Cells(3,17).Value = Worksheetfunction.StDev(Range("I"&RwStart&":I"&NewEnd2))
RwStart and NewEnd2 both calculate fine so the problem is in the Range. How should the I be incremented to the correct start point?
What are the rules for the use of " and &?
cheers
Fedds2
Cells(2,16).Value = Worksheetfunction.Average(Range("I2:I"&NewEnd))
Cells(3,16).Value = Worksheetfunction.StDev(Range("I2:I"&NewEnd))
These two lines work fine
Cells(2,17).Value = Worksheetfunction.Average(Range("I" &RwStart&":I"&NewEnd2))
Cells(3,17).Value = Worksheetfunction.StDev(Range("I"&RwStart&":I"&NewEnd2))
RwStart and NewEnd2 both calculate fine so the problem is in the Range. How should the I be incremented to the correct start point?
What are the rules for the use of " and &?
cheers
Fedds2