Search code examples
excel-formulaexcel-2007

Multiple IF OR conditions in Excel formula


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.

enter image description here

I use Excel 2007 and know to use CTRL+SHFT+ENTER for this formula.


Solution

  • 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)))