If then formula for dates with multiple criteria
Sometimes what seems to be a simple formula, leaves me frustrated far too long. Here to humbling myself …
I have an audit field (date field), I am trying to build a formula that will return the results of the audit based on date. When building the COUNTIF formula using both a date column and several test columns, I am getting the #incorrect argument set" error. I suspect it is because of the column properties being different. So I created a helper column to convert the date to "Today", "Yesterday" or "Past".
Separately these formulas work -
=IF([AUDIT DATE]@row = TODAY(-1), "Yesterday", "Blank")
=IF([AUDIT DATE]@row = TODAY(), "Today", "Blank")
When I nest them together, I the results are #UNPARSEABLE
=IF(AUDIT DATE]@row = TODAY(), "Today", [AUDIT DATE]@row = TODAY(-1), "Yesterday", "Blank")
I know it has to be something simple but I can not figure it out.
Dawn
Best Answer
-
Happy to help. 👍️
Answers
-
You are missing the second IF( before the second argument.
But you may not need a separate helper column. I use COUNTIFS with different data types throughout regularly. The first step may be that you mentioned a COUNTIF with multiple range/criteria sets, but to be able to use multiple range/criteria sets, you need to use a COUNTIFS (with the "S" on the end). That would throw that particular error message.
-
Paul
Thank you, missing the IF( before the second argument did the trick. But, I also want to work through my original formula and see if I can get it working eliminating the need for the helper column.
Thank you Again …
Dawn
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!