What algorithm should I use to find the closest solution to a given total using a list of integers?
When packing luggage into a car, you put the biggest items in first and then fit the smaller items around them. By analogy, a heuristic approach to your problem is to start with the member of your set that is as large as possible while still being smaller than your target. Then repeat the process for the difference between you current total and your target, and so on. This is known as a greedy algorithm.
For example, if your set is $\{2,3,5,8,13,21, 34\}$ and you target is $32$, start with $21$ (the largest value less than $32$), then add $8$ (because this is the large value less than $32-21=11$), and then add $3$.
A greedy algorithm is quick and simple, but will not always give you the best solution. For example, if your set is $\{1, 5, 23, 26\}$ and you target is $30$ then the greedy algorithm gives $26+1=27$, whereas the best solution is $23+5+1=29$.