I have an excel database with four columns (A, B, C, D). The fourth column (D) has integers. I want to know how to sort the data by summed groups of 30 from the data in D.

For example this data:

Four columns with the first three columns of unnecessary data and the fourth column containing (7,5,6,4,12,9,8,9)

I want sorted to become

Two groups with the first group (7,5,6,12) and the second (9,8,9,4). The data in the previous three columns of course is preserved and follows their respective numbers.

Please let me know how I can do this. Even though my images are of Excel 2003, I have access to higher versions.

Thank you!


That's not 'sorting', but a much more complex problem.

It probably is NP-hard, meaning there is no general computational algorithm even possible (expect brute-force trials). No way to do in Excel without extensive coding.

| improve this answer | |
  • Would you happen to know how the pseudocode for that would work? With that direction I'd like to try my hand at VBA. – BMENRohan Jul 29 '16 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.