Reputation: 24315
I'd like to grab the names in every person's name from this google spreadsheet and put it into a new column. The names will be every nth row.
Upvotes: 14
Views: 28712
Reputation: 27302
One option is to use the filter function to include only rows with row numbers divisible by n (with an offset, if necessary):
=filter(A2:A, mod(row(A2:A)+1,3)=0)
Upvotes: 23
Reputation: 59495
In B2 please try:
=offset(A$1,3*(row()-1)-2,)
As the formula is copied down the offset row relative to A1 increases by three, with no column offset. In the second (starting row) 3*(2-1)-2 is 1 so the A2 value is returned. In the second output row 3*(3-1)-2 returns 4, so the A5 value is returned, and so on.
Upvotes: 4