• 469K Members
• 4,863 Online
• 568K Conversations

New Contributor

# 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

# Re: IF Formula in Excel

@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"))))`

# Re: IF Formula in Excel

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"

# Re: IF Formula in Excel

Sorry - only saw your suggested formula after I replied - let me try this....

# Re: IF Formula in Excel

@Annalee2130 , it checks one by one and returns the value for first match

# RE: IF Formula in Excel

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

# Re: RE: IF Formula in Excel

@Peter Bartholomew , for IFS I'd add TRUE condition at the end if no one match

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies