PDA

View Full Version : Look up results across workbooks



tonyrosen
02-22-2006, 02:40 PM
Here's my problem:

I have a workbook (WorkBook1) in which there is a column which consists of "code numbers".

I have a workbook (WorkBook2) in which those numbers are assigned names.

I want the numbers, when my macro is ran, to look up the assigned name and replace the number with the name in WorkBook1 ....

How possible is that, and where would I even begin with that one. All of my previous code was from within one workbook.

Thanks!

XLGibbs
02-22-2006, 03:56 PM
It is very possible, and can be done using formulas in all likelihood....what is the prohibition against having one workbook with two sheets?

You can set up lookup formulas on one workbook, then "move" the other sheet by right-clicking the sheet and selecting move to a new workbook. The formulas will self adjust in that case...

As far as the lookup / replace, this is entirely possible. how many rows of codes are in the 1 workbook, and are there multiple matches possible?

Are there multiple sheets to deal with in each workbook as well?

tonyrosen
02-24-2006, 07:40 AM
sorry for taking so long to get back...

The reason for two workbooks - each is generated from different programs and databases by different groups .... to make one workbook would be asking a whole of collaboration between two competing groups .... :)

There are hundreds of lines of "codes" in that workbook, and the workbook i'm needing to update has thousands.

Killian
02-24-2006, 08:02 AM
This can be done with a worksheet formula
e.g.
='C:\Documents and Settings\Killian\Desktop\[Book2.xls]Sheet2'!A2

XLGibbs
02-24-2006, 08:10 AM
...but as I understand it, Tony needs to actually find the matching data and replace it in his workbook (in effect, an overwrite) and the data may not be continuous in a manner that would allow for formula solutions. With that many codes to lookup and the various other issues, it would be innefficient.

Tony,

If you can post a zipped folder with two sanitized workbooks, one source, one destination and layout what it is you need to do. This is not too bad, can have a solution fairly quickly for you.