Average price of product based on product name.

Ratters

New Member
Joined
May 5, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi all

I run a basic excel for keeping track of my product imports. The meat of it is "Product Name" "Unit Cost" after all the S&H, Tax math has been done.

My problem is that the unit cost varies with each order.

I use =countif to determine how many times the product name pops up in my sheet but wanted to see if i could turn that to into the average unit cost of that product.

Hope that makes sense.

Any help is appreciated.

Rgds

Marc
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
You could do a weighted average.
Something like this:
Book1
ABCDEFG
1Order DateProductQtyUnit CostAvg. Cost
22/2/2023ProdA50$ 5.00ProdA6.68
32/5/2023ProdA26$ 5.00ProdB12.08
42/12/2023ProdB35$ 10.00
53/2/2023ProdB42$ 11.00
63/6/2023ProdB51$ 11.00
73/10/2023ProdA65$ 7.00
83/18/2023ProdB75$ 11.00
93/19/2023ProdB12$ 15.00
103/29/2023ProdA36$ 7.00
114/1/2023ProdA28$ 8.50
124/2/2023ProdB75$ 15.00
134/20/2023ProdA24$ 8.50
Sheet1
Cell Formulas
RangeFormula
G2:G3G2=SUMPRODUCT(--($B$2:$B$13=$F2),($C$2:$C$13),($D$2:$D$13))/SUMIF($B$2:$B$13,$F2,$C$2:$C$13)
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,687
Members
449,117
Latest member
Aaagu

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