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.
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

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.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,330
Messages
5,571,570
Members
412,406
Latest member
DutchMonkey
Top