SOLVED

Nested IF Statement with VLOOKUP

Copper 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

best response confirmed by JCPeterson13 (Copper Contributor)
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 

1 best response

Accepted Solutions
best response confirmed by JCPeterson13 (Copper Contributor)
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)))

View solution in original post