In Excel, I want to change the color of the row at every change in a particular row value. The changed rows could be non-consecutive.
For example:
Customer Product Line Product
1 Outdoor Lawn Jarts
1 Indoor Nerf Hoops
2 Outdoor Ball Game
3 Indoor Fort Builder
4 Indoor Twist'Em
4 Indoor Silly Silly
In this example, I would want customer 1 to be light blue; customer 2, white; customer 3 light blue; customer 4, white, repeating at every customer change.
I'd prefer to use a formula if possible. Thanks.
EDIT: Customer numbers are non-consecutive numbers (1,15,49406, etc.)
Starting in A2, highlight the Range A2:C7 (Or whatever range necessary) and then create a New Rule in the Conditional Formatting Rules Manager. Select "Use a formula to determine which cells to format" and enter this formula:
=MOD(SUM(IF(FREQUENCY($A$2:$A2,$A$2:$A2)>0,1)),2)=1
If the customer numbers include text, you can use:
=MOD(SUM(IF(FREQUENCY(MATCH($A$2:$A2,$A$2:$A2,0),MATCH($A$2:$A2,$A$2:$A2,0))>0,1)),2)=1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With