Distribution function of *sums*?

garyfritz

New Member
Joined
Apr 30, 2011
Messages
20
I know I can use FREQUENCY() to count the items in a list and create a distribution function.

Is there any way to do that, but instead of *counting* the items, I *sum* a corresponding column?

Example: Imagine I have a spreadsheet that lists sales made in a store. It has two columns, price and #sold. So it might look like this:

$1.00, 2
$0.90, 1
$1.10, 3
$1.00, 5
$1.10, 3

So I want to create a distribution function on the bins $0.90, $1.00, and $1.10. FREQUENCY would return:

$0.90, 1
$1.00, 2
$1.10, 2

...which is a count of the # of sales at each price. But what I want is a count of the ITEMS SOLD at each price:

$0.90, 1
$1.00, 7
$1.10, 6

Is there a way to do that, short of extracting it manually?

Thanks!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Have you considered a pivot table with the dollar amounts Row Labels and the sum of the number sold as the Values?
 
Upvote 0
You can use the sumif function.
Excel Workbook
ABCDE
1Price# of SalesPriceTotal Sales
2120.91
30.9117
41.131.16
515
61.13
...
Cell Formulas
RangeFormula
E2=SUMIF($A$2:$A$6,D2,$B$2:$B$6)
 
Last edited:
Upvote 0
Solution
Mike, I have yet to fully "grok" pivot tables so I really don't know how to employ them in this situation.

Rob, SUMIF works when you're looking at exactly matches of 0.90, 1.00, etc. I want it to fit into ranges like FREQUENCY does. BUT I see that SUMIFS will do the trick for me, if I specify conditions of ">=0.9" and "<1.0". Maybe you could combine those conditions in SUMIF but SUMIFS definitely did the trick for me. Thanks!
 
Upvote 0

Forum statistics

Threads
1,224,559
Messages
6,179,515
Members
452,921
Latest member
BBQKING

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