User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » Excel Conditional Formatting - Highlight Groups??? Page [1]  
synapse
play so hard
60929 Posts
user info
edit post

Highlight alternating groups of data based on the data in a column?

Say I have the following table:


Name Age
Bob 14
Mark 16
Mary 16
Steve 18
Robert 18
Frank 20
Mary 20

And I want to highlight alternating rows (or groups of rows) based on the age. In the example above, I would want to highlight the 14 y/o row, and then not the two 16 y/o rows, then highlight the two 18 y/o rows, then not the two 20 y/o rows etc

I know how to highlight alternate rows using conditional formatting and a formula like =mod(row(),2)=1, but not when I base the highlight criteria on a column of data instead of just simply alternating rows.

Anyone have any ideas? I'm assuming conditional formatting is the way to do this, but I'm open to any ideas.

11/6/2007 9:25:01 AM

HaLo
All American
14224 Posts
user info
edit post

i don't believe conditional formatting will work for that, its not powerful enough. vba, and put it in the worksheet/workbook change event

11/6/2007 7:57:35 PM

synapse
play so hard
60929 Posts
user info
edit post

well when you can input a formula there is almost no limit to what you can do

=MOD(SUM(1/COUNTIF($B$1:$B1,$B$1:$B1)),2)=1

11/6/2007 10:56:37 PM

 Message Boards » Tech Talk » Excel Conditional Formatting - Highlight Groups??? Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.38 - our disclaimer.