Conditonal Format (2)

Steve 1962

Active Member
Joined
Jan 3, 2006
Messages
349
Office Version
  1. 365
Platform
  1. Windows
I have values in A1 and B1 and values in C1 and D1.

If the count of values in C1 & D1 (can be either 0, 1 or 2 as there are only two colums) does not equal the count of values in A1 & B1 (can be either 0, 1 or 2 as there are only two colums), then I need to conditional format (TRUE) in cell A1 and B1.

Thanks
 
Last edited by a moderator:

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Does this work?
Book1
ABCD
10x9x
20xxx
30123
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:B3Expression=COUNT($A1:$B1)=COUNT($C1:$D1)textNO
 
Upvote 0
Thanks Habtest.

I used the formula suggested but it didn't seem to work. Maybe I did something wrong.

I am actually using columns K, M and O, P but modified the formula to suit.

I also modified the formula (below) but it is not working also.

=(COUNT(K3)+COUNT(M3))<>(COUNT(O3)+COUNT(P3))

Thanks
 
Upvote 0
Hi Steve, try this instead, mind the absolute reference as in "$K1", and sorry I misunderstood and was doing the opposite of the question.

Book1
KLMNOP
10x9x
20xxx
30123
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
K1:K3,M1:M3Expression=(ISNUMBER($K1)+ISNUMBER($M1))<>(ISNUMBER($O1)+ISNUMBER($P1))textNO


Hope it works, otherwise please check if the value cells are truly values (see if ISNUMBER() returns TRUE), or upload a sample of your data.
 
Upvote 0
Or you could use this function to conditionally format A1

=IF(AGGREGATE(3,4,C1:D1)=AGGREGATE(3,4,A1:B1),TRUE,FALSE)

Check the screen shot of my spreadsheet to see if it is what you want.





1626213493830.png


Kind regards

Saba
 
Upvote 0

Forum statistics

Threads
1,215,062
Messages
6,122,923
Members
449,094
Latest member
teemeren

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