Multiple IFs in If Statement
Hi there -
I'm creating a simple task tracking sheet, but having trouble formulating the correct formula.
I have a TASK, ASSIGNED DATE, and a DUE DATE. I would like the due date to be dependent on the task at hand - a survey would be due 2 days after assigned, permit comments are due 3 days after, and so on (I have 5 tasks total, with differing lengths of time to complete the task).
Here is my formula, i am receiving an "#UNPARSEABLE" error.
=IF(TASK@row = "SURVEY", [DATE ASSIGNED]@row + 2), IF(TASK@row = "PERMIT COMMENTS", [DATE ASSIGNED]@row + 3)
Answers
-
@aecross You have a misplaced parenthesis
Try this:
=IF(TASK@row = "SURVEY", [DATE ASSIGNED]@row + 2, IF(TASK@row = "PERMIT COMMENTS", [DATE ASSIGNED]@row + 3))
Darren Mullen, join the Smartsheet Guru Elite
Get my 7 Smartsheet tips here
Author of: Smartsheet Architecture Solutions
-
You don't need the ) after the if statement starts just add another If statement for "Value if false" section of the statement.
The below worked for me
=IF(Task@row = "SURVEY", Date@row + 2, IF(Task@row@row = "PERMIT COMMENTS", Date@row + 3, IF(Task@row@row = "Task3", Date@row + 4, "Error")))
-
@Darren Mullen - that worked, thank you!
A follow up question, I should have included this in the original question, but how can i incorporate the WORKDAY function into this formula?
=IF(TASK@row = "SURVEY", [DATE ASSIGNED]@row + 2, IF(TASK@row = "PERMIT COMMENTS", [DATE ASSIGNED]@row + 3))
-
@aecross You could use that in place of [DATE ASSIGNED]@row + 2 and +3. Or... you could probably use the if statement within the workday function since the if statement returns a date.
Darren Mullen, join the Smartsheet Guru Elite
Get my 7 Smartsheet tips here
Author of: Smartsheet Architecture Solutions
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.2K Get Help
- 445 Global Discussions
- 143 Industry Talk
- 476 Announcements
- 5K Ideas & Feature Requests
- 84 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 488 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!