# using AND

Hi,

Beginning 2023 I found my formula to say 'Yes" in a column if the row was entered this month was doing it for the previous years month as well so not delivering a true result for entries of the "Current month".

Old formula.

=IF(MONTH([Customer reported date]@row) = MONTH(TODAY(0)), "YES", "NO")

I also have a formula doing the same for if the entry was this year

=IF(YEAR([Customer reported date]@row) = YEAR(TODAY(0)), "YES", "NO")

To replace the first formula I was trying to combine the two but keep getting an incomplete error?

Was trying the below, what am I getting wrong?

=IF(AND(MONTH([Customer reported date]@row) = MONTH(TODAY(0))),(YEAR([Customer reported date]@row) = YEAR(TODAY(0))), "YES", "NO")

Thank you in advance for any help.

• You were very close! It's just where you had your parentheses.

Try this: =IF(AND(MONTH([Customer reported date]@row) = MONTH(TODAY(0)), (YEAR([Customer reported date]@row) = YEAR(TODAY(0)))), "YES", "NO")

I moved one parenthesis as shown in bold above. That parenthesis closed out the AND formula, which we didn't want to do until we'd included the YEAR condition.

• Try =IF(AND(MONTH([Customer reported date]@row) = MONTH(TODAY()), (YEAR([Customer reported date]@row) = YEAR(TODAY()))), "YES", "NO")

• You were very close! It's just where you had your parentheses.

Try this: =IF(AND(MONTH([Customer reported date]@row) = MONTH(TODAY(0)), (YEAR([Customer reported date]@row) = YEAR(TODAY(0)))), "YES", "NO")

I moved one parenthesis as shown in bold above. That parenthesis closed out the AND formula, which we didn't want to do until we'd included the YEAR condition.