I have an array of numbers (a column in excel). I calculated the half of the set's total and now I need the minimum number of set's values that the sum of them would be greater or equal to the half of the total.
Example:
The set: 5, 5, 3, 3, 2, 1, 1, 1, 1
Half of the total is: 11
The least amount of set values that need to be added to get 11 is 3
What is the formula to get '3'?
It's probably something basic but I have not used calculus in a bit hence may have forgotten just forgotten it.
Normally I would use a simple while loop with a sort but I am in excel so I was wondering is there a more elegant solution.
P.S. I have the values sorted in descending order to make things easier.
EDIT: Example