Conditional format row designation to show mismatch with column designations

Brian Feth

New Member
Joined
May 21, 2017
Messages
37
Windows 10, Excel 2010;

I have a table where the column headers match the row labels. i.e. columns beginning at B1, C1, D1 are labeled MPH001, MPH040, MPH051 etc. for 100 columns (with no pattern to the labels). The rows are labeled the same, i.e. rows A2, A3, A4 are labeled MPH001, MPH040, MPH051 etc. for 100 rows. It creates a matrix with the rows and columns labeled the same. I want to conditionally format the column headers to show a mismatch with the rows. Does B1 match A2, does C1 match A3. I tried =B$1<>$A2, that didn't work.

I can see how I could do this with vba but I'm wondering if anyone can come up with a conditional formatting formula that will do it.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi,

In a new sheet, I entered values 1, 2, 3, 4, 5, 6 into B1:G1 and 1, 6, 3, 4, 5, 2 into A2:A7

Clicked on B1, Conditional Formatting->Use a formula to determine which cells to format

Entered formula:
Code:
=B$1<>INDIRECT("$A"&COLUMN())

Selected a fill colour for where formula returns TRUE

Applies to range:
Code:
=$B$1:$G$1

Click OK

Cells C1 and G1 are highlighted as not being equal to A3 and A7 respectively.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

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