IF Function not giving correct value!
I have a scenario where I need to capture all as per the end date and the date request by the requestor to complete the task, are completed on time. I wrote the following formula basis that.
=IFERROR(IF([Work Order Status]@row = "On Hold", 1, IF([Project End Date]@row < [Requested Date]@row, 1, IF([Project End Date]@row < [Revised Request Date]@row, 1, 0))), "")
Even though I have added IFERROR for the blank cells it is returning 1 as the value in the formulae.
Can anyone please help with this?
Answers
-
A blank cell will always be considered less than a cell with a date in it. It isn't necessarily throwing an error, so the IFERROR won't kick in.
Which cell(s) being blank should produce a blank value from the formula?
-
It is returning "1" for blank Project End Date. Can you please help me to re-write this?
Prajna
-
Hi @Prajna J
Hope you are fine, try to use IF with ISBLANK function to avoid blank cells.
bassam.khalil2009@gmail.com
☑️ Are you satisfied with my answer to your question? Please help the Community by marking it as an ( Accepted Answer), and I will be grateful for your "Vote Up" or "Insightful"
-
Try this...
=IF([Project End Date]@row <> "", IF(OR([Work Order Status]@row = "On Hold", [Project End Date]@row < [Requested Date]@row, [Project End Date]@row <[Revised Request Date]@row), 1))
-
Paul thanks for working on this, but it is still not working.
It should return "1" only in the case where Project End Date < Request Date and Revised Request Date and when the status of the task is "On Hold". it should also leave the formula cell blank if any of the reference cells is blank.
Prajna
-
OK. That is different from how I was understanding your initial post and comments. If ALL must be filled in and ALL must be true, then you would use something like this...
=IF(AND([Project End Date]@row <> "", [Work Order Status]@row = "On Hold", [Requested Date]@row <> "", [Revised Request Date]@row <> "", [Project End Date]@row < [Requested Date]@row, [Project End Date]@row < [Revised Request Date]@row), 1)
-
it is still not working and leaving the cell blank without value.
-
In the same sequence, I have one more formula, I have done one more formula wherein I need to know what all tasks are delivered on committed date .i.e., the project end date is the same as the commit date. I tried following but not giving any value.
=IF(AND([Project End Date]@row <> "", [Work Order Status]@row = "On Hold", [Commit Date]@row <> "", [Project End Date]@row < [ Commit Date]@row), 1)
Prajna
-
Hi,
If I use ISBLANK it gives #INCORRECT ARGUMENT SET Error.
-
=IF(AND([Project End Date]@row <> "", [Work Order Status]@row = "On Hold", [Requested Date]@row <> "", [Revised Request Date]@row <> "", [Project End Date]@row < [Requested Date]@row, [Project End Date]@row < [Revised Request Date]@row), 1)
This formula says that none of the three fields can be blank, [Work Order Status] must be "On Hold" and [Project End Date] must be less that both the [Requested Date] and the [Revised Request Date].
This is based on your comment of
"It should return "1" only in the case where Project End Date < Request Date and Revised Request Date and when the status of the task is "On Hold". it should also leave the formula cell blank if any of the reference cells is blank."
-
Hey @Prajna J
Since you're making a Less than, Greater than comparison with dates, you could try the ISDATE function to only allow Date values to be evaluated. This function will also weed out any blanks that might be present
=IF(AND(ISDATE([Project End Date]@row), [Work Order Status]@row = "On Hold", ISDATE([Commit Date]@row), [Project End Date]@row < [Commit Date]@row), 1)
Kelly
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!