PDA

View Full Version : Highlighting a range of data based on a cell within a loop



Binoy
12-10-2007, 10:03 AM
hi all,

I need some help figuring this out. A dataset I have is made up of 9 columns and will vary in length on any given day. I'm trying to write a macro where the code will run through a specific column on the data set (Column A), and if it says "Transportation" will highlight the row of data and then move on to the next one.

I'm running into issues on getting it to properly define the range of data to highlight. Any ideas or more detail needed?

Thanks,

Binoy

Norie
12-10-2007, 10:11 AM
Couldn't you just use conditional formatting?

ie Select all the rows, goto Format>Conditional formatting, select formula is, enter this formula

=$A1="Transportation"

and format as required.