count/sum of numbers between specific range for 2 different values

Mehow

New Member
Joined
Feb 23, 2018
Messages
15
Hi All,

So my question is how to show how many numbers fall into a specific range between 2 different numbers:

KWC 21 days wersja dobra.xls
BCDEF
5Start numberEnd Number22-3031-4546+
62429500
733430100
848680020
94344010
10275641510
11275731511
Sheet1


The yellow part of the table i have calculated manually and entered the numbers need to come up with a count/sum formula to calculate how many numbers fall into specific range depending on Start/End Date

So if start number is 27 - end number is 56
That means 27,28,29,...,54,55,56
-> so for the 22-30 range we have - 27,28,29,30 = sum of 4
-> for the 31-45 range we have 31,32,33,...,44,45 = sum of 15
-> for the 46+ range we have 46,47,...,54,55 = sum of 10

What formula to use?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
The yellow part of the table i have calculated manually
Have you done it correctly? For example in row 6 the numbers are this aren'y they?
24, 25, 26, 27, 28, 29
If so it looks like 6 of them fit in the 22-30 range, not 5?

.. and surely cells D10 and D11 should be the same as each other since both sets of numbers start at 27 and go beyond 30?

Could you make use of something like this?

22 07 28.xlsm
ABCDE
3223146
430451000
5Start numberEnd Number22-3031-4546+
62429600
733430110
848680021
94344020
10275641511
11275741512
Count in Range
Cell Formulas
RangeFormula
C6:E11C6=MAX(MIN($B6,C$4)-MAX($A6,C$3)+1,0)
 
Upvote 0

Forum statistics

Threads
1,215,136
Messages
6,123,246
Members
449,093
Latest member
Vincent Khandagale

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