ExcelUser5005
New Member
- Joined
- Jan 23, 2019
- Messages
- 9
Hi,
I need an solution in VBA to find Best combination of sum value or Nearest to sum value from the list of data.
For ex:
in A column
A1 = 10
A2 = 20
A3 = 35
A4 = 50
A5 = 60
Given sum value
B1 = 100
B2 = 85
Expected output from macro
A1 = 10 B2
A2 = 20 B2
A3 = 35 B1
A4 = 50 B2
A5 = 60 B1
Total B1 is 95 which is near to 100. This is the best near combination of sum values
Total B2 is 80 which is near to 85. This is the best near combination of sum values
Kindly help
Thanks
I need an solution in VBA to find Best combination of sum value or Nearest to sum value from the list of data.
For ex:
in A column
A1 = 10
A2 = 20
A3 = 35
A4 = 50
A5 = 60
Given sum value
B1 = 100
B2 = 85
Expected output from macro
A1 = 10 B2
A2 = 20 B2
A3 = 35 B1
A4 = 50 B2
A5 = 60 B1
Total B1 is 95 which is near to 100. This is the best near combination of sum values
Total B2 is 80 which is near to 85. This is the best near combination of sum values
Kindly help
Thanks