Need help with 'If , Then' function to subtract Duration Values
I'm setting up a Construction Schedule with Variance calculations as the 'Near Term' baseline solution that's been quoted as coming for a few years now has not materialized yet.
Unfortunately after searching the forums I'm not seeing syntax examples that work for what I need to do. It would be helpful for me at least to see more synatx examples listed and I have found these in the forums primarily as responses to questions but still can't get this to work and now just need to finish this up quickly.
Below is a screen shot, I can calculate the duration between two columns as long as there are positive numbers using: =([Actual Duration]@row - [PLAN DURATION]@row)
When there is a 0 value however there is the error #INVALID OPERATION that I'd like to get rid.
In the first row I tried the following If , Then but must be missing a space or character or something simple since some variation of this should work to avoid the #UNPARSEABLE error.
=IF [PLAN DURATION] > 0, ([Actual Duration]@row - [PLAN DURATION]@row)
Best Answer
-
Try this (misplaced parenthesis)...
=IF([PLAN DURATION]@row > 0, [Actual Duration]@row - [PLAN DURATION]@row)
EDIT: Also added "@row" to first cell reference.
Answers
-
Try this (misplaced parenthesis)...
=IF([PLAN DURATION]@row > 0, [Actual Duration]@row - [PLAN DURATION]@row)
EDIT: Also added "@row" to first cell reference.
-
That did it! Thank you sir!
I'll be sure to remember to bracket everything in parens from now on and should have realized the row needed to be referenced in the logical expression along with the rest.
-
Happy to help! 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!