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, smartsheetguru.com
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, smartsheetguru.com
Get my 7 Smartsheet tips here
Author of: Smartsheet Architecture Solutions
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!