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.9K Get Help
- 410 Global Discussions
- 219 Industry Talk
- 457 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!