# count of intervals within range at a given increment size>

#### cloobless

##### Board Regular
I'm trying to find a formula to return a value that represents the count of intervals at a certain increment size within a range. For example:
 RULE FROM TO BY 1 12 90 6 2 2 5 1.75 2 4 50 3

<tbody>
</tbody>
Rules:
The returned value must include the starting point "FROM" value as a count of one interval.

If the "TO" rule is not evenly divisible by the "BY" increment, the last interval point inside of the range is counted. For example, in a range of 10 to 30 at increments of 3, the last possible point is at 28:

If it is evenly divisible, obviously the end of the range is included (30, if the range was 10 to 30 by 2).

10 to 30 by 3:
10
13
16
19
22
25
28

For a count of 7.

It is the count that I'm trying to write a formula for.

Any ideas?

Last edited:

### Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

cloudless,

Try...
Excel Workbook
BCDE
1FromToByCount
2103037
Sheet2

Hope that helps.

#### cloobless

##### Board Regular
Snakehips, this works perfectly. I truly appreciate your expertise and willingness to help. Thank you.

#### Snakehips

##### Well-known Member
You are welcome. I just noticed that the spellchecker had it's way with your forum name... 'cloudless' ....... not a 'cloob' in sight !

Last edited:

#### cloobless

##### Board Regular
I think "cloudless" would refer to the sunny, airy space between my ears.

Replies
3
Views
509
Replies
1
Views
337
Replies
6
Views
149
Replies
4
Views
158
Replies
14
Views
542

1,190,916
Messages
5,983,569
Members
439,850
Latest member
suhailrocks786

### 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.

### Which adblocker are you using?

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