Home

Question regarding IF statement.

%3CLINGO-SUB%20id%3D%22lingo-sub-755347%22%20slang%3D%22en-US%22%3EQuestion%20regarding%20IF%20statement.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-755347%22%20slang%3D%22en-US%22%3E%3CP%3EI%20run%20this%20and%20I%20get%20it%201%2F2%20right.%20If%20Delivery%20part%20seems%20to%20work.%20But%20when%20its%20not%20Delivery%20I%20get%20a%20False%20return.%20Not%20choosing%20any%20other%20options%20beyond.%20help%3F%20I%20added%20Pickup%20and%20regardless%20if%20I%20add%20or%20remove%20that%20The%20second%20solution%20is%20never%20provided.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(P1%3D%22Delivery%22%2C%22Pickup%22%2C%26amp%3BQ1%26amp%3B%22%20%22%26amp%3BAE1%22%20%22%26amp%3BAI1%22%2C%20Q1%26amp%3B%22%20%22%26amp%3BAF1%22%20%22%26amp%3BAJ1)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-755347%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ENeed%20Help%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-755466%22%20slang%3D%22en-US%22%3ERe%3A%20Question%20regarding%20IF%20statement.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-755466%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F376658%22%20target%3D%22_blank%22%3E%40bullrunpremier%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPerhaps%20you%20mean%3C%2FP%3E%0A%3CPRE%3E%3DIF(P1%3D%22Delivery%22%2CQ1%26amp%3B%22%20%22%26amp%3BAE1%26amp%3B%22%20%22%26amp%3BAI1%2CIF(P1%3D%22Pickup%22%2CQ1%26amp%3B%22%20%22%26amp%3BAF1%26amp%3B%22%20%22%26amp%3BAJ1%2C%22%22))%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-755471%22%20slang%3D%22en-US%22%3ERe%3A%20Question%20regarding%20IF%20statement.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-755471%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F376658%22%20target%3D%22_blank%22%3E%40bullrunpremier%3C%2FA%3E%26nbsp%3BIF%20has%20three%20arguments%3A%20the%20logical%20test%2C%20the%20value%20if%20TRUE%2C%20and%20the%20value%20if%20FALSE.%20These%20arguments%20are%20separated%20by%20commas.%20Try%20removing%20the%20comma%20between%20%3CSTRONG%3E%22Pickup%22%3C%2FSTRONG%3Eand%20%3CSTRONG%3E%26amp%3BQ1%3C%2FSTRONG%3E.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EFormula%20without%20extra%20comma%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3DIF(P1%3D%22Delivery%22%2C%22Pickup%22%26amp%3BQ1%26amp%3B%22%20%22%26amp%3BAE1%22%20%22%26amp%3BAI1%22%2C%20Q1%26amp%3B%22%20%22%26amp%3BAF1%22%20%22%26amp%3BAJ1)%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ELet%20me%20know%20if%20it%20works.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3EYvette%3C%2FP%3E%3C%2FLINGO-BODY%3E
bullrunpremier
Occasional Visitor

I run this and I get it 1/2 right. If Delivery part seems to work. But when its not Delivery I get a False return. Not choosing any other options beyond. help? I added Pickup and regardless if I add or remove that The second solution is never provided.

 

=IF(P1="Delivery","Pickup",&Q1&" "&AE1" "&AI1", Q1&" "&AF1" "&AJ1)

2 Replies

@bullrunpremier 

Perhaps you mean

=IF(P1="Delivery",Q1&" "&AE1&" "&AI1,IF(P1="Pickup",Q1&" "&AF1&" "&AJ1,""))
Highlighted

@bullrunpremier IF has three arguments: the logical test, the value if TRUE, and the value if FALSE. These arguments are separated by commas. Try removing the comma between "Pickup" and &Q1.


Formula without extra comma:

 

=IF(P1="Delivery","Pickup"&Q1&" "&AE1" "&AI1", Q1&" "&AF1" "&AJ1)

 

Let me know if it works.

 

Thanks,

Yvette

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
33 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
9 Replies