Thread: [Solved] If with multiple And
View Single Post
 
Old 10-23-2020, 12:06 AM
PrincessApril PrincessApril is offline Windows 10 Office 2019
Competent Performer
 
Join Date: Nov 2019
Posts: 102
PrincessApril is on a distinguished road
Default If with multiple And

Hi all,

I am attempting to display a birthday cake icon in Column C when the date of birth in Column D matches today's month and day, disregarding the year.

I got it working for when just the month matches, with this:
Code:
=IF(MONTH($D6)=MONTH(TODAY()),"🎂","")
However, I can't seem to trigger only when the exact month and day match.

I was first just trying this, but I believe that considers the year:
Code:
=IF($D6=TODAY(),"🎂","")
Then I tried doing multiple conditions by combining If and And, as follows, but I got an alert error saying "There's a problem with this formula. If you're not trying to type a formula..."

Code:
=IF(AND((MONTH($D6)=MONTH(TODAY())),(DAY($D6)=DAY(TODAY())),"🎂",""))
I'm guessing I'm just missing something simple but can't seem to figure it out. Any help would be greatly appreciated. Thank you all as always!
Reply With Quote