Select range item to add up to a (parameter) total

J

John

I have a list of data (A1:B15) that contains a product (A) and amount
(B). I need a formula or other method that will determine what
product(s) will add up to a given total---the total is a parameter.

For example:
banana, $1.00
apple, $0.50
pear, $2.00
grapes, $3.00

Total (Parameter): $5

Answer:
pear, $2.00
grapes, $5.00

Note that an item cannot be counted more than once.
 
Top