Nested IF with Vlookups

csamy987

New Member
Joined
Feb 5, 2019
Messages
3
Hi,

I built a table (PriceTable) that keeps pricing based on volume ordered as follows:
ColumnA ColB ColC ColD
1 ProductName Sign Qty Price
2 ProductA > 10 $3
3 ProductA < 10 $4

When looking at my sales, I would like to use IF and VLOOKUP to check if the sale is more than or less than 10. I know I can just use > or < but my pricing table has close to 60 items so I am trying to use a dynamic formula to check the whole table. For example,
Sale A is for 15 of Product A. They will pay $3 per item
ColumnA ColB ColC
1 ProductName Qty Price
2 ProductA 15 Formula???????

My formula in cell C2 above is
=IF(AND(A2=VLOOKUP(A2,PriceTable,1,FALSE),B2&VLOOKUP(A2,PriceTable,2,FALSE)&VLOOKUP(A2,PriceTable,3,FALSE)),
VLOOKUP(A2,PriceTable,4,FALSE),"")
The formula result is #VALUE ! because it recognizes 15>10 as text instead of values. Can I use something other than & in this formula or is there any other way of doing it?

Thanks in advanced.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Welcome to the Board!

I think just using VLOOKUP with approximate matching will work, if you set up your look up table correctly.
Instead of using < or >, simply enter the lower bound for each range. For example, instead of "less than 10", you would use 0. And instead of "greater then or equal to 10", you would just 10.

See here for an example: http://excelnotes.com/how-to-use-vlookup-approximate-match/
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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