lundi 31 mai 2021

Excel Multiple conditions IF OR AND

I need to create an Excel one formula that will pick up the following conditions:

  1. 1. If have only Sweden =IF(C12:C27="Sweden";"SE05")

    2. If Sweden and Norway, then the code is CH51 =IF(OR(C12:C27="Norway";C12:C27="Finland");"CH51"

    3. Multiple courtiers, any of countries like Sweden, Norway, Finland =IF(C12:C27="Sweden";C12:C27="Norway"; C12:C27="Finland");"GB80";"")

When I used the formulas separated they work, however I need to combine them together, so it make sense. I tried to use OR /AND together with IF formulas, but it did not return the correct values. I use this =IF(AND(C12:C27="Norway";C12:C27="Finland");"CH51") but then it returns CH51, even if I have all the countries in the list (Sweden, Norway, Denmark)

Can you please advice what formula to use to return all the conditions in the right way?

enter image description here

Aucun commentaire:

Enregistrer un commentaire