Home

IF Formula in Excel

%3CLINGO-SUB%20id%3D%22lingo-sub-403321%22%20slang%3D%22en-US%22%3EIF%20Formula%20in%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-403321%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20do%20an%20%3DIF%20formula%20with%20multiple%20logical%20options%3A%20%3DIF(OR(A5%3DCRM!A5%2C%22CRM%22%2C%5BA5%3DAffiliates!A5%2C%22Affiliate%22%5D%2C%5BA5%3DSupplier!A5%2C%22Supplier%5D)%20But%20it%20is%20not%20accepting%20and%20I%20can't%20see%20where%20I'm%20going%20wrong.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-403321%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-403728%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20Formula%20in%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-403728%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20plain%20English%3A%3C%2FP%3E%3CP%3EIf%20Cell%20%22ContactDetails%22A5%20is%20equal%20to%20Sheet%20%22CRM%22A5%20then%20cell%20should%20fill%20as%20%22CRM%22%3C%2FP%3E%3CP%3EIf%20Cell%20%22ContactDetails%22A5%20is%20equal%20to%20Sheet%20%22Affiliates%22A5%20then%20cell%20should%20fill%20as%20%22Afilliates%22%3C%2FP%3E%3CP%3Eand%3C%2FP%3E%3CP%3EIf%20Cell%20%22ContactDetails%22A5%20is%20equal%20to%20Sheet%20%22Suppliers%22A5%20then%20cell%20should%20fill%20as%20%22Suppliers%22%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-403869%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20Formula%20in%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-403869%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESorry%20-%20only%20saw%20your%20suggested%20formula%20after%20I%20replied%20-%20let%20me%20try%20this....%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-403490%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20Formula%20in%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-403490%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F315844%22%20target%3D%22_blank%22%3E%40Annalee2130%3C%2FA%3E%26nbsp%3B%2C%20what%20is%20the%20logic%20for%20OR%20in%20plain%20English%3F%20Perhaps%20you%20need%20nested%20IF%20like%3C%2FP%3E%0A%3CPRE%3E%3DIF(A5%3DCRM!A5%2C%22CRM%22%2CIF(A5%3DAffiliates!A5%2C%22Affiliate%22%2CIF(A5%3DSupplier!A5%2C%22Supplier%22%2C%22nothing%20from%20it%22))))%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-405145%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20Formula%20in%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-405145%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F315844%22%20target%3D%22_blank%22%3E%40Annalee2130%3C%2FA%3E%26nbsp%3B%2C%20it%20checks%20one%20by%20one%20and%20returns%20the%20value%20for%20first%20match%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-405977%22%20slang%3D%22en-US%22%3ERE%3A%20IF%20Formula%20in%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-405977%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20not%20sure%20what%20the%20square%20brackets%20were%20intended%20to%20be%3F%20An%20alternative%20to%20a%20nested%20IF%20that%20is%20available%20from%20Excel%202016%20and%20on%20is%20the%20IFS%20function.%3C%2FP%3E%3CP%3E%3D%20IFS(%3C%2FP%3E%3CP%3EA5%3DCRM!A5%2C%20%22CRM%22%2C%3C%2FP%3E%3CP%3EA5%3DAffiliates!A5%2C%20%22Affiliate%22%2C%3C%2FP%3E%3CP%3EA5%3DSupplier!A5%2C%20%22Supplier%22%20)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-406429%22%20slang%3D%22en-US%22%3ERe%3A%20RE%3A%20IF%20Formula%20in%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-406429%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214174%22%20target%3D%22_blank%22%3E%40Peter%20Bartholomew%3C%2FA%3E%26nbsp%3B%2C%20for%20IFS%20I'd%20add%20TRUE%20condition%20at%20the%20end%20if%20no%20one%20match%3C%2FP%3E%3C%2FLINGO-BODY%3E
Annalee2130
New Contributor

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

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

 

@Sergei Baklan 

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"

@Sergei Baklan 

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

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

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

@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