Forum Discussion
Anto93
Sep 27, 2023Copper Contributor
Formula for multiple IF conditions
Hi, I was looking for a formula to check a range of cells for either of the three 1. 'Passed' 2. 'Failed' 3. Blank Cell If all cells in the range have 'Passed' the result cell should ret...
- Sep 27, 2023
Hi Anto93,
I apologize for my previous answer, which was incorrect. I have re-read your question carefully and researched and tested different solutions. Here is the best working solution I have found:
=IF(COUNTIF(G7:G44,"Failed")>0,"Failed",IF(COUNTBLANK(G7:G44)>0,"Incomplete","Passed"))This formula works as follows:
- The IF function checks the condition that there are at least one cell in the range G7:G44 that contains the value "Failed".
- If this condition is TRUE, the formula returns the value "Failed".
- Otherwise, the formula checks the condition that there are at least one blank cell in the range G7:G44.
- If this condition is TRUE, the formula returns the value "Incomplete".
- Otherwise, the formula returns the value "Passed".
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)
Riny_van_Eekelen
Sep 27, 2023Platinum Contributor
Anto93 Following the same logic, try this:
=IF(COUNTIF(G7:G44,""),"",IF(COUNTIF(G7:G44,"Failed"),"Failed","Passed"))
Anto93
Sep 27, 2023Copper Contributor
Riny_van_Eekelen Thanks a lot for the response. I tried it like this now. But unfortunately now its returning me Blank irrespective of if the cells in range have 'Failed' or 'Passed'