Hello dear experts,
I am facing a challenge today: need to find a sum of payments for groups of subjets ('Name' in the table below) that fall within assets ranges:
name
assets
payment
A
100,400
456
B
300,500
1344
C
100,800
357
D
1,800,000
7348
E
300,003
467
F
340,000
966
G
15,000,900
34533
H
785,004,000
7238
The ranges start from 100,000 and increment every 100,000 until 10,000,000. Whatever is greater than 10,000,000 is grouped together. So, there are 100 assets ranges:
100,001-200,000
200,001-300,000
...
1,900,001-2,000,000
2,000,001-2,100,000
...
10,000,000 and over
For example, payment for A and C will be summarized together. Same goes with B, E, and F. Also G and H.
I know it should be a loop with an incremental value to calculate sum of payments for each asset range but I can't figure it out. Need your help please!
Thanks
... View more