Conditional Formatting problem

Scottcmu

Board Regular
Joined
Aug 1, 2002
Messages
150
Howdy,
I need a function that will let me use Conditional Formatting to highlight certain rows. I need to highlight alternating groups of rows based on if the row's value for a specific cell stays the same or changes. So, consider the following spreadsheet:
col Row A B C D
1 x 2 x x
2 y 2 y y
3 z 3 z z
4 d 3 d d
5 e 3 e e
6 f 1 f f
7 k 1 k k

Consider only column B here -
Rows 1 and 2 need to be yellow since they have the same value for B. Then, rows 3,4 and 5 need to be white, then rows 6 and 7 again need to be yellow.

Can anyone help?
Thanks!
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
On 2002-08-02 12:29, Scottcmu wrote:
Howdy,
I need a function that will let me use Conditional Formatting to highlight certain rows. I need to highlight alternating groups of rows based on if the row's value for a specific cell stays the same or changes. So, consider the following spreadsheet:
col Row A B C D
1 x 2 x x
2 y 2 y y
3 z 3 z z
4 d 3 d d
5 e 3 e e
6 f 1 f f
7 k 1 k k

Consider only column B here -
Rows 1 and 2 need to be yellow since they have the same value for B. Then, rows 3,4 and 5 need to be white, then rows 6 and 7 again need to be yellow.

Can anyone help?
Thanks!

Check this post out:

http://www.mrexcel.com/board/viewtopic.php?topic=16623&forum=2
 
Upvote 0
Assuming that the values in column B are grouped together, this is one way. I have added two columns D & E. Column D counts the number of times the value in Col B for that row appears. Col E then checks these counts in COL D for the value ONE and checks to see if it is ODD. The Conditional Format is based on COL E.

Formula is =$E2=TRUE
Book1
ABCDE
1FIELD 1FIELD 2FIELD 3
2AAA15551TRUE
3BBB14442TRUE
4CCC23331FALSE
5DDD22222FALSE
6EEE21113FALSE
7FFF301TRUE
8GGG3-1112TRUE
9AAA4-2221FALSE
10BBB4-3332FALSE
11CCC4-4443FALSE
12DDD5-5551TRUE
13EEE5-6662TRUE
14FFF5-7773TRUE
15GGG6-8881FALSE
16AAA6-9992FALSE
17BBB7-11101TRUE
18CCC7-12212TRUE
19AAA8-13321FALSE
20BBB8-14432FALSE
21CCC8-15543FALSE
...

HTH you get started It's Friday and I'm Out of Here

Edit: Had to repost HMLT with Color Added. I Guess CONDITIONAL FORMATTING Doesn't come across in HTML
_________________
Scotch: Because you don't solve great Excel problems over white wine
This message was edited by lenze on 2002-08-02 15:47
 
Upvote 0

Forum statistics

Threads
1,225,141
Messages
6,183,103
Members
453,148
Latest member
yevhen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top