Why is my conditional formatting rule not working?

nithchun

New Member
Joined
Sep 20, 2024
Messages
9
Office Version
  1. 365
Platform
  1. Windows
I'm trying to create a conditional formatting rule where it goes through every column, discluding the header, and check if the column has any active cells using COUNTA, and if it doesn't, it should highlight the whole column red. However, it is not working even though I think the formula is correct. Here is my formula. I would appreciate any help on this.

=COUNTA(A:A) = 0

with the whole dataset as the range, without row A1 to disclude headers.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about:
=COUNTA(A:A)=1
Applies to: =$1:$1048576

Dante Amor
ABCD
1Head1Head2Head3Head4
2datadata
3
Hoja3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
1:1048576Expression=COUNTA(A:A)=1textNO
 
Upvote 0
How about:
=COUNTA(A:A)=1
Applies to: =$1:$1048576

Dante Amor
ABCD
1Head1Head2Head3Head4
2datadata
3
Hoja3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
1:1048576Expression=COUNTA(A:A)=1textNO
 
Upvote 0
Thank you, that worked! I don't know why this worked and the other solution didn't but appreciate your help!
 
Upvote 0
I don't know why this worked and the other solution didn't
It is because the formula counts the entire column, so if you have a header the result is 1, it means you have the header and no more data.
So = 1 turns the column red. = 0 does not make it red, because 0 is not equal to 1 and greater than 1 means that there is more data than the header.

I hope it's clearer now
😇
 
Upvote 0

Forum statistics

Threads
1,223,948
Messages
6,175,571
Members
452,652
Latest member
eduedu

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