Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Alternate shading in every other row

Status
Not open for further replies.

dvirgint

Programmer
Jun 28, 2010
85
CA
Hello,

I have a macro which scrapes information from an outside program and creates a table with the information.

To increase readability, I would like to have every other row shaded. Since the amount of information which is scraped varies from time to time, I may have 1 or more pages, and I would like to have the shading only on the section of the table which has data. Is this clear enough?

I have found countless sites with the conditional format formula: =MOD(COLUMN(),2)=0

This is great and works for a fixed number of rows and columns. Can I make this formula dynamic?

Thanks
dvirgint
 


hi,

If you have Excel 2007+, use select in the table and use Insert > Table.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
that formula IS dynamic - all that needs to be made dynamic is the range to apply it to

Can you use the macro recorder to record yourself setting that CF over your current data set and then give us an idea of where your data starts from in the sheet?

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 


Actually your posted formula relates to COLUMNS not ROWS.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 


What I failed to state is that the TABLE feature in Excel 2007+ has formatting selections for AUTOMATIC alternate row shading and many many other useful features.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top