I have a list of values in Excel (e.g., in the range A2:A40), and I want to find a combination of these values that sum up to a target value using VBA.For example, the total sum of values in A2:A40 is -765, but I want to find which rows I need to sum to get -750.I want the row range and target value to be selectable by the user. Could someone help me with a VBA script to achieve this?
I am a noob in vba so I am asking for help
SAURABH BHARDWAJ is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.