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.
Best Answers
-
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.
www.linkedin.com/in/juliefortney-pmp-smartsheetpartner-lssblackbelt
-
Try =IF(AND(MONTH([Customer reported date]@row) = MONTH(TODAY()), (YEAR([Customer reported date]@row) = YEAR(TODAY()))), "YES", "NO")
Answers
-
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.
www.linkedin.com/in/juliefortney-pmp-smartsheetpartner-lssblackbelt
-
Try =IF(AND(MONTH([Customer reported date]@row) = MONTH(TODAY()), (YEAR([Customer reported date]@row) = YEAR(TODAY()))), "YES", "NO")
-
Thank you, I can see just how close it was! Working nicely now!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!