how do i select every other cell in a column? every nth cell?


G

Guest

how can i select every other cell in a column? every nth cell? i have a
bunch of data but only want to to perform calculations on some of the points.
 
Ad

Advertisements

B

Bob Umlas

That will ADD them. To SELECT them, try the following:
If your data is in A1:A100, enter 1 in B1, X in B2. Select B1:B2,
double-click the fill handle
Now with B1:B100 selected, use edit/goto special, select Constants, deselect
all but "Numbers".
Now you have B1,B3,B5,... selected. Now go to VBA, and enter this in the
immediate window:
Selection.Offset(,-1),Select

and you have it!

Bob Umlas
Excel MVP
 
J

JulieD

Hi Bob

he said that he wanted to "perform calculations on them", so i thought
giving him an example of adding would help :)

Cheers
JulieD
 
J

Jason Morin

One way for selecting every other, assuming col. A with
header in A1:

1. Copy this into B2 and fill down:
=ISEVEN(ROW())
2. Select both columns.
3. Go into Data > Filter > AutoFilter.
4. Select TRUE for col. B.
5. Select the range of visible cells in col A (A2:An).
6. Press F5 > Special > and click "Visible cells only".
7. Remove the filter via Data > Filter > AutoFilter

HTH
Jason
Atlanta, GA
 
Ad

Advertisements

B

Bob Tarburton

And for evey "n"th row
=mod(row(),"n")=0
in place of the iseven function below should cover you
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top