Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
RobRed
 
Posts: n/a
Default Conditional formatting for groups

I have an Excel list where the first column identifies a group, like
1
1
1
3
4
4
6
6
6
Now I want to color the rows of the groups alternating for better readability.
Group 1 (the rows starting with 1) - red
Group 2 (the rows starting with 3) - blue
Group 3 (the rows starting with 4) - red
Group 4 (the rows starting with 6) - blue
....and so on

The numbers in this list are not in sequence and have gaps.
The number of rows belonging to a group differs from group to group.

Any smart and experienced guy out there who can help?
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

Requires a helper column...

1. Assuming your groups are in col. B, place a 1 in A1
and copy the following into A2:

=(B2<B1)*(A1<1)+(B2=B1)*A1

Copy this formula all the way down to your last row.

2. Select all the rows with data.
3. Go to Format Conditional Formatting.
4. Under Condition 1, choose "Formula Is" and use:

=$A1=0

5. Press the Format button, click on a color off the
Pattern tab, and press OK.
6. Click Add, Formula Is, and use:

=$A1=1

7. Press the Format button and choose another color.

HTH
Jason
Atlanta, GA

-----Original Message-----
I have an Excel list where the first column identifies a

group, like
1
1
1
3
4
4
6
6
6
Now I want to color the rows of the groups alternating

for better readability.
Group 1 (the rows starting with 1) - red
Group 2 (the rows starting with 3) - blue
Group 3 (the rows starting with 4) - red
Group 4 (the rows starting with 6) - blue
....and so on

The numbers in this list are not in sequence and have

gaps.
The number of rows belonging to a group differs from

group to group.

Any smart and experienced guy out there who can help?
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting in Excel Help Please..... Willie T Excel Discussion (Misc queries) 4 February 9th 05 02:28 PM
Effect of Conditional Formatting, Data Validation Bill Sturdevant Excel Discussion (Misc queries) 1 January 25th 05 11:50 PM
Copy conditional formatting across multiple rows? Gil Excel Discussion (Misc queries) 1 January 11th 05 11:27 AM
Determine cells that drive conditional formatting? Nicolle K. Excel Discussion (Misc queries) 2 January 7th 05 01:08 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 07:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"