SOLVED
Home

Nested IF Statement with VLOOKUP

%3CLINGO-SUB%20id%3D%22lingo-sub-776400%22%20slang%3D%22en-US%22%3ENested%20IF%20Statement%20with%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-776400%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3ECurrently%20have%20an%20IFERROR%20statement%20written%20with%202%20arguments%20and%20looking%20to%20add%20a%203rd%20argument.%20Having%20issues%20implementing%20the%203rd%20argument%20correctly.%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EHere%20is%20what%20it%20is%20currently....%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3DIF(C5%3D%22Pick-Your-Own%22%2C(IFERROR((VLOOKUP(B5%2C'Package%20Pricing'!%24J%243%3A%24K%2421%2C2%2CFALSE)*I5)%2B(VLOOKUP(B5%2C'Package%20Pricing'!%24J%2422%3A%24K%2440%2C2%2CFALSE)*J5)%2B(VLOOKUP(B5%2C'Package%20Pricing'!%24J%2441%3A%24K%2459%2C2%2CFALSE)*K5)%2C%22%240%22)*1)%2CIFERROR(VLOOKUP(B5%2C'Package%20Pricing'!%24J%2460%3A%24K%2478%2C2%2CFALSE)%2C%22%240%22)*1)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3ELooking%20to%20add....%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EIFERROR(VLOOKUP(B5%2C'Package%20Pricing'!%24J%2479%3A%24K%2484%2C2%2CFALSE)%2C%22%240%22)*1)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20is%20appreciated!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-776400%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-776430%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20IF%20Statement%20with%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-776430%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F383255%22%20target%3D%22_blank%22%3E%40JCPeterson13%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYour%20formula%20already%20has%20two%20conditions%3A%20In%20case%20C5%3D%22Pick-Your-Own%22%20below%20part%20will%20work%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%230000FF%22%3E(IFERROR((VLOOKUP(B5%2C'Package%20Pricing'!%24J%243%3A%24K%2421%2C2%2CFALSE)*I5)%2B(VLOOKUP(B5%2C'Package%20Pricing'!%24J%2422%3A%24K%2440%2C2%2CFALSE)*J5)%2B(VLOOKUP(B5%2C'Package%20Pricing'!%24J%2441%3A%24K%2459%2C2%2CFALSE)*K5)%2C%22%240%22)*1)%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eand%20in%20case%20condition%20is%20false%20below%20part%20will%20work%3C%2FP%3E%3CP%3E%3CFONT%20color%3D%22%23339966%22%3EIFERROR(VLOOKUP(B5%2C'Package%20Pricing'!%24J%2460%3A%24K%2478%2C2%2CFALSE)%2C%22%240%22)*1)%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Eto%20enter%20third%20argument%20you%20need%20to%20define%20second%20condition%20for%20C5%20then%20third%20argument%20will%20work.%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-776467%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20IF%20Statement%20with%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-776467%22%20slang%3D%22en-US%22%3EYou%20can%20follow%20below%20to%20define%20second%20condition%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3DIF(C5%3D%22Pick-Your-Own%22%2C%20(IFERROR((VLOOKUP(B5%2C'Package%20Pricing'!%24J%243%3A%24K%2421%2C2%2CFALSE)*I5)%2B(VLOOKUP(B5%2C'Package%20Pricing'!%24J%2422%3A%24K%2440%2C2%2CFALSE)*J5)%2B(VLOOKUP(B5%2C'Package%20Pricing'!%24J%2441%3A%24K%2459%2C2%2CFALSE)*K5)%2C%22%240%22)*1)%2CIF(C5%3D%22XYZ%22%2C(%20IFERROR(VLOOKUP(B5%2C'Package%20Pricing'!%24J%2460%3A%24K%2478%2C2%2CFALSE)%2C%22%240%22)*1)%2C(IFERROR(VLOOKUP(B5%2C'Package%20Pricing'!%24J%2479%3A%24K%2484%2C2%2CFALSE)%2C%22%240%22)*1)))%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-776637%22%20slang%3D%22en-US%22%3ERe%3A%20Nested%20IF%20Statement%20with%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-776637%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20so%20much!!%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F239215%22%20target%3D%22_blank%22%3E%40tauqeeracma%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
JCPeterson13
New Contributor

Currently have an IFERROR statement written with 2 arguments and looking to add a 3rd argument. Having issues implementing the 3rd argument correctly.

 

Here is what it is currently....

=IF(C5="Pick-Your-Own",(IFERROR((VLOOKUP(B5,'Package Pricing'!$J$3:$K$21,2,FALSE)*I5)+(VLOOKUP(B5,'Package Pricing'!$J$22:$K$40,2,FALSE)*J5)+(VLOOKUP(B5,'Package Pricing'!$J$41:$K$59,2,FALSE)*K5),"$0")*1),IFERROR(VLOOKUP(B5,'Package Pricing'!$J$60:$K$78,2,FALSE),"$0")*1)

 

Looking to add....

IFERROR(VLOOKUP(B5,'Package Pricing'!$J$79:$K$84,2,FALSE),"$0")*1)

 

Any help is appreciated!

3 Replies

@JCPeterson13 

Your formula already has two conditions: In case C5="Pick-Your-Own" below part will work

(IFERROR((VLOOKUP(B5,'Package Pricing'!$J$3:$K$21,2,FALSE)*I5)+(VLOOKUP(B5,'Package Pricing'!$J$22:$K$40,2,FALSE)*J5)+(VLOOKUP(B5,'Package Pricing'!$J$41:$K$59,2,FALSE)*K5),"$0")*1)

 

and in case condition is false below part will work

IFERROR(VLOOKUP(B5,'Package Pricing'!$J$60:$K$78,2,FALSE),"$0")*1)

 

to enter third argument you need to define second condition for C5 then third argument will work.

Thanks

Solution
You can follow below to define second condition:

=IF(C5="Pick-Your-Own", (IFERROR((VLOOKUP(B5,'Package Pricing'!$J$3:$K$21,2,FALSE)*I5)+(VLOOKUP(B5,'Package Pricing'!$J$22:$K$40,2,FALSE)*J5)+(VLOOKUP(B5,'Package Pricing'!$J$41:$K$59,2,FALSE)*K5),"$0")*1),IF(C5="XYZ",( IFERROR(VLOOKUP(B5,'Package Pricing'!$J$60:$K$78,2,FALSE),"$0")*1),(IFERROR(VLOOKUP(B5,'Package Pricing'!$J$79:$K$84,2,FALSE),"$0")*1)))

Thank you so much!! @tauqeeracma 

Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
201 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies