I have 3 cells in which I need all 3 conditions met. a1, a2 and a3. If a1 = 4 or 2 or 1 or 1 AND a2 = 4 or 2 or 1 AND a3 =4 or 2 or 1 then put "Yes421" in cell a4. If not met then put "No421" in cell a4
How do I write this formula in Excel?
I have 3 cells in which I need all 3 conditions met. a1, a2 and a3. If a1 = 4 or 2 or 1 or 1 AND a2 = 4 or 2 or 1 AND a3 =4 or 2 or 1 then put "Yes421" in cell a4. If not met then put "No421" in cell a4
How do I write this formula in Excel?
Hi Helpinghand, and welcome to the forum,
Try this formula in cell A4:
=IF(AND(OR(A1=1,A1=2,A1=4),OR(A2=1,A2=2,A2=4),OR(A3=1,A3=2,A3=4)),"Yes421","No421")
Here's one way
=IF(SUM(COUNTIF(A1:A3,{1,2,4}))=3,"Yes421","No421")
Here's another way...
=IF(AND(OR(A1={1,2,4}),OR(A2={1,2,4}),OR(A3={1,2,4})),"Yes421","No421")
Hope this helps!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks