Getting values from other xls file

Solved/Closed
Report
-
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
-
Hello,

I have 2 xls files (book1.xls and book2.xls). In book1.xls the first column (A1) has certain names in first 10 rows (say x1, x2, x3, x4, ...... x10). The second xls book2.xls has sheets with same name as the names in the column A1 of the first xls (book1), that is, the names of the sheets on book2.xls are x1, x2, x3, x4, ...... x10.
Now what i have to do is to get certain values from book2.xls from the corresonding sheet (in book2) as in the column A1 (in book1), for example: in book1 corresponponding to x1 i have to get the column D1 value from sheet x1 from the book2.xls, and in book1 corresponponding to x2 i have to get the column D1 value from sheet x2 from the book2.xls and so on .... for each value until x10.
Can someone pls help/guide me on this ?



1 reply

Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
803
I am rephrasing your problem

in book1.xls in sheet1 from A1 to a10 is like this
x1
x2
x3
x4
x5
x6
x7
x8
x9
x10
book2.xls has got sheets named x1,x2,x3 etc.
in each of these sheets there is some entry in D1

in book1.xls in sheet1 in B1 copy this formula
=INDIRECT("[book2.xls]"&A1&"!d1")
copy B1 down