Greetings,
I'm trying to break a number down into a component of ranges.
For example:
Is there an easy way to break a number into a range of values that make it up?
eg.
I have 4 steps (This is a variable number of steps but, for this exmample they are:
5000, 10,000, 15,000, 20,000
I want a function where if I feed it 5001 I get a reply like:
up too 5000 = 5000
up 5000 but less than 10000 = 1
Or if I entered 19000 I get buckets like:
up too 5000 = 5000
over 5000 and up too 10000 = 5000
over 10,000 up to 15000 = 5000
over 15,000 up to 20000 = 4000
I'm trying to break a number down into a component of ranges.
For example:
Is there an easy way to break a number into a range of values that make it up?
eg.
I have 4 steps (This is a variable number of steps but, for this exmample they are:
5000, 10,000, 15,000, 20,000
I want a function where if I feed it 5001 I get a reply like:
up too 5000 = 5000
up 5000 but less than 10000 = 1
Or if I entered 19000 I get buckets like:
up too 5000 = 5000
over 5000 and up too 10000 = 5000
over 10,000 up to 15000 = 5000
over 15,000 up to 20000 = 4000