say I have a number
And I have a dynamically changing group:
- group 1 – 0 to 100,000
- group 2 – 100,001 to 200,000
- group 3 – 200,000
Is there a formula where I can split it up this way in that the first 100,000 goes into the first group, then the next 150,000 goes into the second group, and the third group is empty.
I’ve been trying with If statements, and the first group is easy, but the second one I try to subtract from the first, but only after I check its higher then the max of group 1 and everythings starts breaking.
Thanks so much.
This is the formula everybody has been talking about. The value is in A2.
Note that 100,000,000 is an arbitrary high number intended to be larger than any you will ever have to sort. The array must be sorted in descending order.
To mirror BigBen’s comment, you need to do a
=MATCH(). Instead of the
0 (exact), you can change it to
-1 depending on your needs.