How to find lowest price for product and then lookup associated data

JDW96

New Member
Joined
Jan 22, 2018
Messages
2
Hi everyone!

Hoping you can help me. I'm trying to build a pricing database for building supplies. I have prices from many suppliers for products and would like to have a page displaying only the lowest price for each product, along with relevant data such as product code and pack size.

I have structured the data with a new line for each price to allow me to have more information for each supplier, e.g. product code.



I have worked on a formula to return the lowest price for each product:

=MIN(IF(Sheet1!$A$1:$A$10000=A2,Sheet1!$F$2:$F$10000))



Alternatively this formula could be used:

=AGGREGATE(15,6,Sheet1!$F$2:$F$401/(Sheet1!$A$2:$A$401=A2)/(Sheet1!$F$2:$F$401>0),1)



Once I have this minimum price do you have any ideas as to how I could then pull though the other data I need. I can do it with a VLOOKUP on the price value, but then if I had any items with exactly the same price in the data it would return the first result rather than the one I am looking for. The second attached spreadsheet demonstrates this problem


Many thanks in advance for your help, I really appreciate it!
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Welcome to the Board!

Consider:

ABCDEFGHIJK
1ProductVendorDatePriceProductMin PriceVendorDate
2AAl1-Jan1B1Doug4-Jan
3BCal2-Jan2
4ABob3-Jan5
5BDoug4-Jan1
6CAl5-Jan1
7ACal6-Jan3
8

<tbody>
</tbody>
Sheet7

Worksheet Formulas
CellFormula
K2=SUMIFS(C:C,A:A,H2,F:F,I2)

<tbody>
</tbody>

<tbody>
</tbody>

Array Formulas
CellFormula
J2{=INDEX($B$2:$B$7,MATCH(H2&"|"&I2,$A$2:$A$7&"|"&$F$2:$F$7,0))}

<tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



I assume your MIN formula is in I2. Then you can use the J2 array formula to find the match. If the value you are looking up is numeric (dates are numbers), AND there are no duplicate Product/Price combinations, you can use the somewhat simpler formula in K2. If there are duplicate Product/Price combinations, use the J2 formula, and it will return the first matching combination.

Hope this helps!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

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