Log in

View Full Version : Macro to Identify Amounts Based on Criteria Value



showtyme
01-31-2017, 07:31 AM
A

B

C

D

E

F



$10


5

5

8

5





2

5

2

8





-7.25



-3





-2








5








8








-3






Hello,

I have a criteria value ($10) that I need to find in column C or any combination of positive or negative numbers that equals to the criteria value. The data range in column C also has amounts that has decimals. The results should be displayed in the subsequent columns (D, E, F, etc). If there is only one combination that equal to the criteria value then obviously the results will be displayed in column D. The same number can be used in various combinations (see example above). Sometimes the criteria value can be found in column without any combination of numbers that sums to it, so that result should show in column D. I will likely not have results that extends to many many columns.

Can someone help create this macro code.

showtyme
01-31-2017, 09:04 AM
A

B

C

D

E

F



$10


5

5

8

5





2

5

2

8





-7.25



-3





-2








5








8








-3






Hello,

I have a criteria value ($10) that I need to find in column C or any combination of positive or negative numbers that equals to the criteria value. The data range in column C also has amounts that has decimals. The results should be displayed in the subsequent columns (D, E, F, etc). If there is only one combination that equal to the criteria value then obviously the results will be displayed in column D. The same number can be used in various combinations (see example above). Sometimes the criteria value can be found in column without any combination of numbers that sums to it, so that result should show in column D. I will likely not have results that extends to many many columns.

Can someone help create this macro code.

The criteria value in the example is in cell A1.

Admin
01-31-2017, 01:41 PM
Hi

Have a look at this article

http://www.tushar-mehta.com/excel/templates/match_values/

showtyme
01-31-2017, 06:44 PM
Hi

Have a look at this article

http://www.tushar-mehta.com/excel/templates/match_values/

Thank you so much! Exactly what I was looking for.