SOLVED

Formula for multiple IF conditions

Copper Contributor

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 return 'Passed'

If at least one cell has 'Failed' the result cell should return 'Failed'

And if at least one cell is Blank, the result cell should remain Blank or maybe return 'Incomplete'

 

I have created a formula to fulfill the Pass/Fail conditions =IF(COUNTIF(G7:G44,"Failed"),"Failed","Passed")

but unable to include the condition for Blank cells.

Please help with modifications to include the Blank cell condition.

 

Thanks

 

4 Replies

@Anto93 Following the same logic, try this:

=IF(COUNTIF(G7:G44,""),"",IF(COUNTIF(G7:G44,"Failed"),"Failed","Passed"))

 

best response confirmed by Anto93 (Copper Contributor)
Solution

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 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'

Hi @LeonPavesic, Thanks for the response.
It seems to be working. Thanks a lot. (y)