Let me try to explain the situation the best I can.
Lets say I have 3 values
1, 2, 3
I tell an algorithm to split this values into
If you want exact same values, then for number of columns x=2, it is the classic Partition Problem which is NP-Complete, but has pseudo polynomial solutions.
Any more columns (i.e. x>2), and it becomes strongly NP-Complete. 3-Partition Problem.
For x > 3, I suspect it will still be strongly NP-Complete.
Since the x-partition problem can be reduced to your problem, it is going to be as hard as the above problems.
You would probably need some heuristic methods to help you out.
I would do it like this:
I answered a similar question a while back.
I can think of a greedy sub optimal solution.
This is never going to give you the optimal solution though.
For your case, 8 7 4 3 1 would be the order. And you would (luckily) get the same results as you've mentioned.
8 = 8
7 1 = 8
4 3 = 7
This will not always give you the optimal solution