matching numbers in 2 columns

atrain812

New Member
Joined
Sep 11, 2002
Messages
1
I am looking for a macro or something to find a combination of numbers from one column and match them to a combination of numbers in a second column.

Ex. A B
1 18
7 12
35 17
3 4
5
1+3 in column A = 4 in column B
35 in column A = 18 + 17 in column B
7+5 in column A = 12 in column B

There will be many more numbers involved however I think I can limit the search to say that A = B where A and B are both no more than 5 numbers. Nothing fancy needed. Once it finds a hit, it could stop and the numbers could be removed manually and so that it could run a new search. I have no idea how to do this so any help would be great.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Jay Petrulis

MrExcel MVP
Joined
Mar 17, 2002
Messages
2,040
Hi,

The MrExcel August Challenge would be a good starting point.

http://mrexcel.com/board/viewtopic.php?topic=16914&forum=12&86

Search for the posts by Sharad Kothari and Ioannis for pure VBA solutions.

Also, there are a number of routines using the Solver that would be available to you.

The idea would be your *target* value in list 1 is searched for in list two. When the first solution is found, the routine would exit, report the result and continue with the next item in the *target* list.
 

Forum statistics

Threads
1,147,738
Messages
5,742,899
Members
423,760
Latest member
photogfrog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top