Reputation: 139
In Excel I made a formula based on a MAX condition if several conditions are true. So far the formula looks:
=MAX(IF(A:A="Nissan";IF(B:B="Green";C:C)))
Now, I would like a formula based on multiple colors, for example Green and Blue Nissans. I can not figure out where I have to place the color Blue.
I use Excel 2007 and know to use CTRL+SHFT+ENTER for this formula.
Upvotes: 0
Views: 80
Reputation: 75840
If you have Excel 2016, you could use MAXIFS()
and feed the formula a list of values. Particularly handy if you have more than two criteria for column A or B or both.
=MAXIFS(C3:C10,A3:A10,"Nissan",B3:B10,{"Blue","Green"})
Upvotes: 2
Reputation: 8365
This works - still need to use ctrl+shift+enter:
=MAX(IF(A:A="Nissan";IF(OR(B:B="Green";B:B="Blue");C:C)))
Tested and works, I had to pay attention to the ";" and ","...
Borrowing the {} from JvdV below, this works:
=MAX(IF(A:A="Nissan";IF((B:B={"Green";"Blue"});C:C)))
Upvotes: 2