Search code examples
excelfinance

Categorizing data in Excel


I'm creating a non-operating expenses sheet and I'm trying to find an easy way to sort data. Basically I want to categorize into bins. If I have a set of cells say

11
21
21
50
67
45

Is there a way to sort them so if I did something like typed a bin number into the adjacent cell I could collect them. Basically,

11 | 1
21 | 2
21 | 3
50 | 2
67 | 1
45 | 1

1 | 123
2 | 71
3 | 21


Solution

  • Assuming your data is in column A (the numbers, 11, 21, 21, 50, 67, and 45), and the "Bin" number is in column B

    Where you want 123, 71, 21, you can use do this on a new range, say starting in column E (where you have the 1, 2, 3, etc.)

    =SUMIF($B$1:$B$6,E1,$A$1:$A$6) and drag down

    (Adjust the range as necessary)

    enter image description here

    Edit: Kindly explain any downvotes? I know there wasn't much given in OP, but this looked pretty simple. Should I have waited for more effort anyways?