Finding Last Purchase Price For Vendor/Material - Sorted Untabbed Pivot Table?

aware073

Board Regular
Joined
Jun 5, 2015
Messages
54
Hey all,
I have two sheets in my workbook. The first has a list of materials, the second has a list of 2015 "receipts" of those materials - i.e. everytime they received that material into inventory, with the pricing.
Sheet 1 -

Excel 2010
ABCDEFGHIJKLMNO
1MaterialPlantMaterial DescriptionStorage BinValuated UnRes StockAve PriceStock ValuePrice UnitSafety StockMax. LevelBase UOM2015 Usage2015 ReceiptsVendorInfo Record Price
2230665M242RECEPTACLE FEMALE SVC RFG50E00A-3B00Z020201.0002,148.842,148.8411.0001.000EA00#N/A
3236708M242RECEPTACLE GR MNTD SVC RMG50E00B-3B00020201.0001,960.841,960.8411.0001.000EA00#N/A
4219521M242PACKING ROPE 1/4 BENTLEY-HARRIS TS 1000020200188.0000.3769.5611.000500.000FT00#N/A
5233688M242PACKING ROPE 3/8 BENTLEY-HARRIS TS 1000020200400.0000.84336.0011.000500.000FT-840#N/A
6230774M242PLUG W/RECEPTACLE ALCO P371X38020302.00020.7741.5412.0006.000EA00#N/A
7232111M242SHEAVE GOOD 321A382-5MK1020301.000214.00214.0011.0002.000EA00#N/A
8219523M242PACKING ROPE 1/2 BENTLEY-HARRIS TS 1000020300500.0001.02510.0011.000500.000FT00#N/A
9224290M242FUSE 15.5KV MAX CUTL 15CX-6C0203012.000156.98313.9611.0002.000EA00#N/A
10235879M242FUSE BUSS 15.5CAVH1E0203018.00023,019.631,841.571002.0005.000EA00#N/A
11219532M242RELAY GROUND TRIP L/P 07-00130203022.000163.53327.0611.0001.000EA-12602660
12229146M242FUSE 2E 2.75-5.5KV GE 9F60BDD0020203023.00081.13243.3911.0001.000EA00#N/A
13237754M242FUSE 1.5 AMP 15.5KV MCGR FA4H10203020.000159.600.0015.00010.000EA-70#N/A
14225132M242RECEPTACLE FEMALE 16/C SVC C55-003R0203031.000932.40932.4011.0003.000EA01602660
ZOPS SETUP


Sheet 2 -

Excel 2010
ABCDEFGHI
1PlntMaterialMaterial DescriptionVendorPstng DateQuantity in UnEEUnAmount in LCPer
2M242218691CPLG SLIP PVC 2IN SCH8060259009/15/201520.000EA305.4015.27
3M242218703FITTING 200LB 2IN AQUAMINE 29080000260259011/05/201530.000EA216.307.21
4M242218703FITTING 200LB 2IN AQUAMINE 29080000260259010/22/201510.000EA72.107.21
5M242218703FITTING 200LB 2IN AQUAMINE 29080000260259009/15/201530.000EA216.307.21
6M242218703FITTING 200LB 2IN AQUAMINE 29080000260259003/09/20158.000EA57.687.21
7M242218703FITTING 200LB 2IN AQUAMINE 29080000260259003/03/201512.000EA86.527.21
8M242218718VLV FOOT BALL AL 2IN GREAT PLAINS 10860259010/22/201520.000EA470.0023.5
9M242218718VLV FOOT BALL AL 2IN GREAT PLAINS 10860259009/22/20154.000EA92.7623.19
10M242218718VLV FOOT BALL AL 2IN GREAT PLAINS 10860259009/15/20156.000EA139.1423.19
11M242218718VLV FOOT BALL AL 2IN GREAT PLAINS 10860259004/24/201520.000EA463.8023.19
2015 RECEIPT


My first step was bringing in the most frequently used vendors for each material, which I did using a pivot table from sheet 2 that counted the appearance of every vendor which I sorted and then used a vlookup to bring it into sheet 1 (column N). I now have to find the lowest purchase price for that material from that most frequently used vendor.
Any suggestions? Another pivot table that will sort by pricing somehow?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi aware073,

I think you should be able to solve it with one pivot table:
-make a pivot of your second sheet
-in the "Rows" box, drop Material and below that "Vendor"
-in the "Values" box, drop "Quantity in UnE" and "Per" (assuming the latter is your price per piece)
-On the Quantity in UnE, right click, Value Field Settings and select "Sum", for "Per" select "Min"
-Now you should have an overview of all materials with the number of items per vendor and the minimum price of that vendor, use the "Design" menu of the pivot table to "Show in Tabular form" and "Repeat all item labels"
-Sort the data by "Sum of Quantity in UnE", the top vendor of each material should be at the top, so you could do an easy VLOOKUP of the vendor, its quantity and its minimum price.

Hope that helps,

Koen
 
Upvote 0
Hey Koen, Can you see any way to manipulate this table to show me the most recent purchase price from that vendor according to the dates in Column E
 
Upvote 0
Hi aware073,
I fiddled around a bit, but that seems near impossible with just a pivot... It's pretty easy to find the last day of a sale by a certain vendor of a certain product: just drag in the Pstng Date and select "Max" (format as date, the dates will now show up like numbers, e.g. 42000 for 27-dec-14). Then there are 2 solutions:
-add with formulas next to your pivot with and AVERAGEIFS formula to pull in the price from your data table (it's basically a VLOOKUP with multiple criteria, an AVERAGEIFS will do just fine here)
-of if you want it in your pivot table: add 2 columns to your data: one to calculate the last sales date of a product-vendor combination, that would be an array formula like this one:
={MAX(IF($B$2:$B$14=B2;IF($D$2:$D$14=D2;$E$2:$E$14;FALSE)))} (in cell J2, press CTRL+SHIFT+ENTER when you enter the formula, see Array Formulas for more details on array formulas
-then in column K enter a formula like =AVERAGEIFS($I$2:$I$14;$B$2:$B$14;B2;$D$2:$D$14;D2;$E$2:$E$14;J2) for the value, then expand the source of the pivot table and add a "Max" of that last column to get the right number.

Good luck :),

Koen
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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