Complicated Median help

rollwrig

New Member
Joined
Mar 3, 2015
Messages
3
I am having problems putting this into words, so bear with me.
I am attempting to find the Median which I normally know how to do. The problem is something else. I have 4 columns

Sales Person
Product
# of Products Sold
Price

I want to find the Median price of products sold for each Sales person. The problem comes when they have sold more then one of a product. My current list is 3600+ rows long otherwise I would manually add all the products in. I have tried pasting in an example below. The only way I can think to do it is to manually add in a cell for each and every product sold. Ex. Row 1, I would add in $27 again. Same for Row 2. Row 4 would have me add 5 additional cells containing $38.00. Can anyone help?


Sales PersonProduct CodeNo Of BottlesPrice
BobA1662$27.00
BobA1662$27.00
BobA49902$38.00
BobA49906$38.00
BobB11921$21.00
BobB30532$45.00
BobB30532$45.00
BobB30536$45.00

<tbody>
</tbody>



Rollie Wright
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
TRY:

Book1
ABCDFG
1Sales PersonProduct CodeNo Of BottlesPricecriteria1MEDIA
2BobA1662€ 27,00Bob110,375
3BobA1662€ 27,00
4BobA49902€ 38,00
5BobA49906€ 38,00
6BobB11921€ 21,00
7BobB30532€ 45,00
8BobB30532€ 45,00
9BobB30536€ 45,00
Foglio2
Cell Formulas
RangeFormula
G2{=AVERAGE(IF(A2:A9=F2,D2:D9*C2:C9))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Hello Rollie, welcome to MrExcel,

If you want the median price for all products sold by Bob try this "array formula"

=MEDIAN(IF(TRANSPOSE(ROW(INDIRECT("1:"&MAX(C2:C10))))<=C2:C10,IF(A2:A10="Bob",D2:D10)))

confirmed with CTRL+SHIFT+ENTER
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,421
Members
448,961
Latest member
nzskater

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