0

this is my first post and a newb at Excel.

I did a few date formulas with conditional formatting and realised after that the formatting is being applied to all the blanks cells as well.

Is there an easy edit I can add to the existing formulas i wrote or do I have to start again?

Formulas below :

=AND($D2>TODAY(),$D2-TODAY()<=7)

=$D2<TODAY()

=$D2=TODAY()
4
  • You can try =IF($D2<>"",$D2<TODAY(),FALSE). Commented Aug 1, 2022 at 10:02
  • How do I add that in my formulas ? Using AND like this =AND($D2>TODAY(),$D2-TODAY()<=7,$D2<>"") let me try Commented Aug 1, 2022 at 10:14
  • Something like =IF($D2<>"",AND($D2>TODAY(),$D2-TODAY()<=7),FALSE). Commented Aug 1, 2022 at 10:16
  • Yes it worked do you mind posting it as an answer Commented Aug 1, 2022 at 10:30

1 Answer 1

1

Use IF() function to detect either it empty or not. Then apply formula if it is not empty. By default excel empty/blank cell is determine as 0 zero when you are comparing with number values. Dates are nothing but number value. So, to avoiding blank cells in conditional formatting use IF() function like-

=IF($D2<>"",AND($D2>TODAY(),$D2-TODAY()<=7),FALSE)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.