Fill a header cell if any non-blank cell below doesn't match

LAWYERDUDE666

New Member
Joined
May 23, 2012
Messages
2
I'm trying to highlight the topmost cell in a row if any non-blank cell in its column does not match the value of the header cell.

The top of each column is the name of an employee.
Each row represents a project on which the employee is working.
If an employee is working on any projects, his name is written only in the rows of the projects on which he is working. (NB: I cannot simplify by simply putting "x"; I am forced to use the employees' names).

I want to be able to highlight any cell in which the spelling of an employee's name does not match the spelling set out in the header cell so that it is easy to see what cells need correcting. But I also want to highlight the header cell, so I know in which column an error appears without having to scroll to the bottom of the column (they're looong) for each employee.

I have figured out how to highlight a cell within a column (w/cond'l formatting) if the spelling of the employee's name doesn't match the spelling of the header cell. What I haven't been able to figure out is how to highlight the header cell with cond'l formatting if any non-blank cell does not match the spelling.

The formula I'm using to highlight the cells in the column is as follows:

=AND(A2<>A$1,NOT(ISBLANK(A1))
If the cell does not match the header cell and also is not blank, it highlights in red.

Any help on how to conditionally format the cells in the header row so that a header cell highlights if any cell below it contains a mistake (ie turns red), wd be appreciated. Thanks.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I'm trying to highlight the topmost cell in a row if any non-blank cell in its column does not match the value of the header cell.

The top of each column is the name of an employee.
Each row represents a project on which the employee is working.
If an employee is working on any projects, his name is written only in the rows of the projects on which he is working. (NB: I cannot simplify by simply putting "x"; I am forced to use the employees' names).

I want to be able to highlight any cell in which the spelling of an employee's name does not match the spelling set out in the header cell so that it is easy to see what cells need correcting. But I also want to highlight the header cell, so I know in which column an error appears without having to scroll to the bottom of the column (they're looong) for each employee.

I have figured out how to highlight a cell within a column (w/cond'l formatting) if the spelling of the employee's name doesn't match the spelling of the header cell. What I haven't been able to figure out is how to highlight the header cell with cond'l formatting if any non-blank cell does not match the spelling.

The formula I'm using to highlight the cells in the column is as follows:

=AND(A2<>A$1,NOT(ISBLANK(A1))
If the cell does not match the header cell and also is not blank, it highlights in red.

Any help on how to conditionally format the cells in the header row so that a header cell highlights if any cell below it contains a mistake (ie turns red), wd be appreciated. Thanks.
Maybe this...

=COUNTIF(A2:A10,A1)<>COUNTA(A2:A10)

A1 being the column header.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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