Sep 13 2022 01:31 PM
I am trying to create a formula that will look at four cells and depending on the condition, return a value from another four cells. If two or more cells are "Yes", I need to return "ERROR". Can anyone point me in the right direction?
Sep 13 2022 01:43 PM - edited Sep 13 2022 01:43 PM
You don't provide detailed information, so I'll just guess.
Let's say the first four cells are B2:B5, and the second four cells are D2:D5.
=IF(COUNTIF(B2:B5, "Yes")>1, "ERROR", IFERROR(INDEX(D2:D5, MATCH("Yes", B2:B5, 0)), ""))
If you have Microsoft 365 or Office 2021:
=IF(COUNTIF(B2:B5, "Yes")>1, "ERROR", XLOOKUP("Yes", B2:B5, D2:D5, ""))
Sep 14 2022 05:00 AM
Sep 14 2022 05:05 AM
B9:B12 contains 4 cells, but B18:B22 contains 5 cells, so there's a problem...
Sep 14 2022 05:18 AM