Forum Discussion

Annalee2130's avatar
Annalee2130
Copper Contributor
Apr 08, 2019

IF Formula in Excel

I am trying to do an =IF formula with multiple logical options: =IF(OR(A5=CRM!A5,"CRM",[A5=Affiliates!A5,"Affiliate"],[A5=Supplier!A5,"Supplier]) But it is not accepting and I can't see where I'm going wrong.

6 Replies

  • I am not sure what the square brackets were intended to be? An alternative to a nested IF that is available from Excel 2016 and on is the IFS function.

    = IFS(

    A5=CRM!A5, "CRM",

    A5=Affiliates!A5, "Affiliate",

    A5=Supplier!A5, "Supplier" )

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Annalee2130 , what is the logic for OR in plain English? Perhaps you need nested IF like

    =IF(A5=CRM!A5,"CRM",IF(A5=Affiliates!A5,"Affiliate",IF(A5=Supplier!A5,"Supplier","nothing from it"))))

     

    • Annalee2130's avatar
      Annalee2130
      Copper Contributor

      SergeiBaklan 

      In plain English:

      If Cell "ContactDetails"A5 is equal to Sheet "CRM"A5 then cell should fill as "CRM"

      If Cell "ContactDetails"A5 is equal to Sheet "Affiliates"A5 then cell should fill as "Afilliates"

      and

      If Cell "ContactDetails"A5 is equal to Sheet "Suppliers"A5 then cell should fill as "Suppliers"

Resources