VLOOKUP with an IF function in one cell of the table

TJW3428

New Member
Joined
Oct 31, 2018
Messages
1
Hi - New member and novice excel user

I'm trying to set up a sheet that will calculate the price of a service based on variable pricing where the rate for the first three units is fixed at $59.30 whether it be 1,2,or 3 units and every unit after that is an extra $19.90.

I am using the formula =IF(A1>3,(A1-3)*19.9+59.3,59.3) to calculate the price which seems to work OK but I have ran into trouble when I try to incorporate it into a VLOOKUP table along with a set of other prices for other products and services.

I'm using two VLOOK up functions set up so the second list option is dependent on the first one

=IFERROR(VLOOKUP(D13,Table30[[Column1]:[Ref]],2,FALSE),"")

=IFERROR(VLOOKUP(E13,Table30[[Ref]:[Amount]],2,FALSE),"")

Is there a way that I can incorporate the IF function into the VLOOKUP table so it will automatically enter the right price according to the number of units I input? I have tried a number of formula's but its beyond my very basic skills.

Thanks for any ideas. - James
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
So this is in E13?

IFERROR(VLOOKUP(E13,Table30[[Ref]:[Amount]],2,FALSE),"")

And 59.3 is the value you want to change with the VLOOKUP?

You can try this:

=IF(A1>3,(A1-3)*19.9+VLOOKUP(E13,Table30[[Ref]:[Amount]],2,FALSE),VLOOKUP(E13,Table30[[Ref]:[Amount]],2,FALSE))

Or can substitute E13 with the first lookup so you don't need it.

=IF(A1>3,(A1-3)*19.9+VLOOKUP(VLOOKUP(D13,Table30[[Column1]:[Ref]],2,FALSE),Table30[[Ref]:[Amount]],2,FALSE),VLOOKUP(VLOOKUP(D13,Table30[[Column1]:[Ref]],2,FALSE),Table30[[Ref]:[Amount]],2,FALSE))
 
Upvote 0

Forum statistics

Threads
1,223,901
Messages
6,175,277
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top