Vlookup with multiple conditions

olivera87

New Member
Joined
May 21, 2022
Messages
6
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2011
  5. 2010
Platform
  1. Windows
Hello,

I ask for your help. I would like to optimize my everyday work, since now it is devided into many excel files that take long to check them all. I have joined all the excel files into one, and now I need help to set up an automatic output cell that would agree with many conditions.

So we have columns: CUSTOMER CODE (3-5 numbers usually), PRODUCT CODE (also 3-5 numbers usually), QUANTITY, PRICE, DATE. There are many customers that have some of the same products, with a price (unique for every partner) that depends on the order quantity (the more products you order, the lower the price). Example: customer 12546 has a product 5555 for a price 2,10 eur if they order 100 pcs, 2,00 eur for 200 pcs, and 1,6 eur for 500 pcs). The quantity is unique for every partner, just like the prices. The date is important since the price can change in the future and I would like to only enter a new period and price when it does.

My wish is to have a sheet with a table where I would write: CUSTOMER CODE, PRODUCT CODE, QUANTITY AND DATE manualy and the PRICE per pcs would be shown automaticly in the next cell considering the conditions. I attached the picture of how the data base would look, and what I would like to get out with a formula.

Please help me, which function would be the best. As I researched, VLOOK would not be the best for this.

Thank you so much for your help. :)
 

Attachments

  • excel example.PNG
    excel example.PNG
    21.3 KB · Views: 20

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.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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