count the occurence within a range of numbers within a colum

L

Legacy 57334

Guest
Hi,

Column E has numbers bettween 1 - 125, in no particular order.

I want to count the number of times the data in this column fall with bands which I set. In this case:
Band A = 1-5
Band B = 6-20
Band C = 21-29
Band D = 30-125

As an example if the data in column E was:
20
3
49
98
4
3
22
The count for band A would be 3.
The count for band B would be 1
The count for band C would be 1
The count for band D would be 2

Quick and easy to do in your head when there in only a little data, but when there is lots....

Thanks
Joel

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

averageexceluser01

New Member
There may be a quicker way to do this with countif, but the sumproduct function works great.

Use this:

Band A =SUMPRODUCT(--(\$E\$1:\$E\$125>=1),--(\$E\$1:\$E\$125<=5))
Band B =SUMPRODUCT(--(\$E\$1:\$E\$125>=6),--(\$E\$1:\$E\$125<=20))
Band C =SUMPRODUCT(--(\$E\$1:\$E\$125>=21),--(\$E\$1:\$E\$125<=29))
Band D =SUMPRODUCT(--(\$E\$1:\$E\$125>=30),--(\$E\$1:\$E\$125<=125))

averageexceluser01

New Member
That is if \$E1:E125 contains all of your data. Otherwise replace this with the entire range.

Replies
3
Views
432
Replies
5
Views
297
Replies
1
Views
173
Replies
16
Views
847
Replies
1
Views
631

1,191,701
Messages
5,988,177
Members
440,135
Latest member
DCDavid

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.

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

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