Reputation: 123
I have numbers stored in cells D5:S19. Each row of this array represents a specific product, the number in each column represents the cost of this item in a given financial quarter (if the product is not available in a given quarter then the cell is blank):
I'm struggling with setting up a conditional format which will highlight the cells which are adjacent and equal on a row by row basis (excluding the blank cells). I have tried using a formula based around the EXACT function (EXACT($D5,$E5)) for the entire array but this doesn't seem to work at all.
Any pointers here would be greatly appreciated. Thank you.
Upvotes: 1
Views: 1180
Reputation: 10359
The way I see it, your highlighted data is going to be in one of three states. It is either:
This lends itself to three distinct conditional formatting rules, to make sure that the use can distinguish between different sets of consecutive values. These come through as follows:
Notice the borders specified for each rule. We then order the rules in reverse order, and set rule 3 to "Stop if True". This means that left and right borders aren't added to our middle cells, like so:
This results in the following conditional formatting (I have only used a subset of your data)
Here's a text version of each of the rules for you to copy:
=AND(D5<>"",D5=E5)
=AND(D5<>"",D5=C5)
=AND(D5<>"",D5=E5,D5=C5)
Hope this helps!
Upvotes: 1