conditional formatting if NA

rjmdc

Well-known Member
Joined
Apr 29, 2020
Messages
672
Office Version
  1. 365
Platform
  1. Windows
hi this is my conditional formatting formula
=AND(L1<=TODAY()-365)
how do i exclude if column A isNOT blank then do the formatting unless leave blank
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi,

I recommend using EDATE (accounts for leap years) rather than -365 in your formula (assuming you're trying to see if it's a year or more ago):

Book3.xlsx
ALMN
412/28/2019FALSEFALSE
5a12/28/2019TRUETRUE
63/15/2021FALSEFALSE
7b3/15/2021FALSEFALSE
Sheet747
Cell Formulas
RangeFormula
M4:M7M4=AND(A4<>"",L4<=TODAY()-365)
N4:N7N4=AND(A4<>"",L4<=EDATE(TODAY(),-12))
 
Upvote 0
neither work it hilites the wrong dates when i correct the formulas
 
Upvote 0
I think I had it backwards...

exclude if column A isNOT blank then do the formatting

Try these:

Book3.xlsx
ALMN
412/28/2019TRUETRUE
5a12/28/2019FALSEFALSE
63/15/2021FALSEFALSE
7b3/15/2021FALSEFALSE
Sheet747
Cell Formulas
RangeFormula
M4:M7M4=AND(A4="",L4<=TODAY()-365)
N4:N7N4=AND(A4="",L4<=EDATE(TODAY(),-12))
 
Upvote 0
hi
i had to use this one
=AND(A1<>"",L1<=TODAY()-365)
then it worked
thanks
 
Upvote 0
You're welcome.

That's what I posted in post #2, you just had to change the cell reference(s) according to your data.
I still recommend using EDATE over -365 if you're testing for a year or older...
 
Upvote 0

Forum statistics

Threads
1,214,859
Messages
6,121,963
Members
449,059
Latest member
oculus

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