I have a series of 2 columns called Amount & Percentage. Now the amount is incrementing with no linear value eg 1659,3167,4495 and I want to have a data for every 1000 that is 1000,2000,3000,4000,5000. It can be done by avreaging the percetage data. How can be done? Then I want to automate it by using c++ but I want a mathematical proof like.

Thanks