How to divide a number into certain intervals

Copper Contributor

For example I have number 51, I want to divide it into 4 intervals.

In column A the interval is 1 - 5
In column B the interval is 6 - 12
In column C the interval is 13 - 20
In column D the interval is 21 or more

So 51 would be
Column A is 5
Column B is 7
Column C is 8
Column D is 31

How to do it with function for each column?

1 Reply

@naufalariiif 

Are you trying to find all possible combinations of 4 numbers from different intervals that add up to a certain other number? In your example there would only be one solution, namely: 1+6+13+21=51

 

What logic did you apply to select the number 8 for column C where the interval is set to 13-20?

 

Or perhaps you want to achieve something completely different.