Sorting Data into Bins in Excel 2010

TheDragonExp

New Member
Joined
Dec 18, 2015
Messages
4
Hello,

I am trying to sort data I have into bins, preferably through some sort of formula. I have tried looking through this website (and others) but can't seem to find a solution. Any help would be greatly appreciated.

Ok, so I have two columns. The first column (say Column A) has a number of values between 0 & ~1200. The second column (Column B) has a number of values between -10 & 80. What I want to do is sort this data into bins based on Column B's values (-10 to 0, 0 to 10, 10 to 20, ... , 70 to 80). Each value from Column A would fit into a bin based on its Column B value. I then need the column A values to sum to a total value for each bin (in a separate Column).

Perhaps a simple example would help illustrate what I am trying to do... So say there is my data in Column A & B, what I want to do is in a separate column (Column C), have Column A's data sorted into Column C based on Column B's values (whichever range it falls into). I would also like the Column A values to sum up in Column C. I have illustrated the answers in the Column C table below. So for BIN '0 to 10', there are two values that fall into that range (8.50 & 9.45), so the total is 160 (80 + 80). Is there anyway to do this by entering some formula into Column C?

Column AColumn B
809.45
110025.65
15-3.74
808.50
6021.58

<tbody>
</tbody>
BIN (based on Column B)Column C
-10 to 015
0 to 10160
10 to 200
20 to 301160

<tbody>
</tbody>



My apologies if my question / example is unclear. I appreciate any assistance you can offer.

Happy Holidays!
J
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
You could use an array formula like this:
Excel Workbook
ABCDE
1809.45-10 to 015
2110025.650 to 10160
315-3.7410 to 200
4808.520 to 301160
56021.58
Sheet13
 
Upvote 0
For those particular circumstances, possibly also this, copied down.

Excel Workbook
ABCDE
1Sum ValueValueRangeSum
2809.45-10 to 015
3110025.650 to 10160
415-3.7410 to 200
5808.520 to 301160
66021.58
Sums




Note: There could be an issue if a value in column B is at the join of one of the ranges, as you haven't made clear what should happen there. For example, if 10 appears in column B, does it belong to '0 to 10' or to '10 to 20'?
 
Last edited:
Upvote 0
Thank you very much Joe! The formula you provided worked perfectly :)

Peter - The formula Joe provided worked! Thank you for your reply as well
 
Upvote 0

Forum statistics

Threads
1,216,163
Messages
6,129,223
Members
449,495
Latest member
janzablox

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