# Thread: get standard deviation from every 1st, 6th and 10th cell in column Thanks: 0 Likes: 0

1. ## get standard deviation from every 1st, 6th and 10th cell in column

Hello

I have a column of data. The # of rows are always multiples of 10.
How to get the standard deviation from the cells in each 1st, 6th and 10th row?
For example if I had 100 rows. I would want the standard deviation from rows 1,6,10,11,16,20,21,26,30...91,96,100

Thanks
Tom

2. ## Re: get standard deviation from every 1st, 6th and 10th cell in column

Try:

=STDEV(IF(MOD(ROW(A1:A20),10)={0,1,6},A1:A20))

and confirm it by pressing Control+Shift+Enter.

3. ## Re: get standard deviation from every 1st, 6th and 10th cell in column

Thanks Eric
Can I do it vba?

4. ## Re: get standard deviation from every 1st, 6th and 10th cell in column

Um, sure . . .

Code:
```Sub test1()

Range("C1") = Evaluate("=STDEV(IF(MOD(ROW(A1:A20),10)={0,1,6},A1:A20))")

End Sub```
You could write a loop that looks at all of your rows, picks out the right numbers, load them to an array, then send that to WorksheetFunction.STDEV, but unless you have a specific reason to do it that way, I'd stick with the Evaluate.