create links to extract data from one excel file to another excel

S

Sundew Chocobo

I'm trying extract data, while using a macro, from one workbook file to
another. How do I do this?
 
G

Gary''s Student

If you are just getting the data, you don't need a link. For example, we
want to get Book1 Sheet1 cell A1 data and put it into Book2 Sheet2 cell B2:

Sub get_it()
Set rFrom = Workbooks("Book1").Sheets("Sheet1").Range("A1")
Set rTo = Workbooks("Book2").Sheets("Sheet2").Range("B2")
rFrom.Copy rTo
End Sub

If not in a macro, then in Book2 Sheet2 cell B2 enter:
=[Book1]Sheet1!$A$1
 
S

Sundew Chocobo

I'm afraid it's a bit more complicated than that... Wookbook 'a' contains one
column with cust. numbers (let's say one cust. number is called 'f') and one
will display either a 'd', 'c', or blank. In workbook 'b' I need to create a
column which will find the newest cust number for 'f' from wookbook 'a' (the
cust. number can be listed serval times) and pick up either the 'd', 'c', or
nothing.
 
S

Sundew Chocobo

Thanks for all the help. :) If you have more ideas, please post.

Thanks again


Sundew Chocobo
 
Top