Conditional Formatting based on Multiple Values

hairball101

New Member
Joined
May 23, 2016
Messages
14
Howdy,

I'm attempting to use conditional formatting to highlight every other group of similar rows. I've been using the following formula in conditional formatting and it's been working fine, but I'm trying to adapt it to look at two other columns as well:

=MOD(SUMPRODUCT(--($I$1:$I1<>$I$2:$I2)),2)

This is just looking at the product name column, but I'd like to have it branch out and look at the Age and Gender column. Sometimes a product has the same name but is divided between genders (Male, Female, Both) or ages (Adult, Child, Infant). While they may share a product name, they are interpreted as different products by our system when the age or gender is different. As such, I'd like the spreadsheet to reflect that difference. Product names are all over the place, so using the above works well since each is a unique occurrence in the spreadsheet. This also works well for my needs since it doesn't create an additional column in the already extensive worksheet.

I've been playing with it for a few days now to get it to start looking at columns S:S and T:T (age and gender). I've been able to tweak it to so it generates a unique number for each new set of rows with the following:

=SUMPRODUCT(--($I$1:$I1<>$I$2:$I2))+SUMPRODUCT(--($S$1:$S1<>$S$2:$S2))+SUMPRODUCT(--($T$1:$T1<>$T$2:$T2))

I'd like to wrap that in a mod(XXXX,2) formula to make it alternate 1s and 0s, but the wall that I've faced is that the total sum of all the SUMPRODUCTs isn't always alternating odd and even, so it'll repeat 1 and 0 when it shouldn't.

I have a formula that works as an additional column to the worksheet, but I'd like one that is self-contained within the conditional formatting formula.


Is there any way to potentially convert the unique numbers into alternating 1s and 0s without tying it to a physical column in the worksheet?

Much thanks for any input
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,215,161
Messages
6,123,380
Members
449,097
Latest member
Jabe

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