Return value if one condition is met
Good Morning,
I am trying this formula within my sheet in a brand new column:
=IF([Planned Start Date]@row - 21 <= TODAY(), [Estimated Hours Number]@row, "")
For this column, if someone put a date that falls between today and three weeks from today, to return the job site hours that is found in the column Estimated Hours Number. IF the date doesn't fall within the three weeks or if the cell is blank, return a blank.
This formula keeps returning a value. The IF condition isn't met, it still returns the value found in column Estimated Hours Number. I don't understand how it is doing this when the condition is false. I have tried using "" and using 0. Do I need to restructure this formula?
Thank you,
Veronica
Comments
-
Using this:
=IF(AND([Planned Start Date]@row - 21 < TODAY(), [Planned Start Date]@row <> 0), [Estimated Hours Number]@row, "")
Formula helped to achieve a blank return because the planned start date was blank however, if the date falls into the three week period or has a date but it isn't in the three weeks, it returns error message "INVALID OPERATIONS"
-
Paul - the formula is pulling data outside of the range given. Essentially, if any date is listed in Planned Start Date column, it returns the hours. I just want it for today and three weeks from today.
-
Thank you Paul - it works! I needed anything scheduled for today + three weeks future. This is going to help with my dashboards to track scheduled work.
-Veronica
-
Happy to help.
Sorry about the initial confusion.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!