Forum Discussion

SneezyCat's avatar
SneezyCat
Copper Contributor
Jan 27, 2022

Can I make custom bins in an Excel histogram?

This is for Excel for Mac, version 16.30.

 

I have a seemingly simple problem:

Let's say I have a column of data that consists of: 3, 4, 4, 4, 6, 6

I want to create a simple histogram that has bins labeled "1", "2", "3", "4", "5", "6"

The bin widths would represent 0.5-1.5, 1.5-2.5, 2.5-3.5, etc.

The "3" bin would have a value of 1, the "4" bin a value of 3, and the "6" bin a value of 2.

The rest would be 0.

 

Is this possible in Excel? Because I can't figure it out. I know I can easily manipulate the data a little and get what I'm looking for (like adding more cells that count values and then plotting those), but I don't understand why it wouldn't just be super easy to do with the histogram function.

 

What I'm really confused about is why I can't just tell my histogram in Excel what the minimum and maximum range is for the histogram. Like, give me a histogram from 0.5 to 6.5 with bin widths of 1.0, count this data, and put it in the bins. It seems like that should be easy to do.

1 Reply

  • JKPieterse's avatar
    JKPieterse
    Silver Contributor
    Does 16.30 allow for the SEQUENCE function? If yes, then you could have your data in a table called tblData and then somewhere place this formula (say in cell C2):
    =SEQUENCE(6)
    Then in the cell next to C2, enter =FREQUENCY(tblData,C2#)

Resources