SOLVED

How to get data from a file if I select the file name from a list of files?

Brass Contributor

In cell K10 I have a drop list with files name (source is column C) is it possible to get the data from the selected file in the drop list?  The target cell is always for example L10. So if I pick a different file name from the drop list I get the value of c ell L10 of the new selected file? if it is possible with a formula because i just start learning VBA and i believe it might be a bit too complex at this stage to use VBA for me 

olopa67_0-1643287474666.png

thank you for your time

3 Replies

@olopa67 

Instead of

='[filename]sheetname'!$L$10

you may use

=INDIRECT( "'[" & K10 & "]sheetname'!$L$10

@Sergei Baklan 

olopa67_0-1643634567841.png

thank you for your reply,

I used the indirect formula in the column TARGET (G5) to have a full path with file name, file extension, work sheet and specific cell i need the value from, but it doesn't give me any result.

it works in the cell G16 where i have the same formula you can see in F16 which i typed manually.

any idea why is not working ? and how to fix it?

the idea is to have later on the column A as a drop list and use it to index and match with column g so i can have the value in G16 to change accordingly. thank you for your time 

best response confirmed by olopa67 (Brass Contributor)
Solution

@olopa67 

I guess here

image.png

it shall be ... &"recepe card'!L10" , not .. &"recepe card'!&(L10)

1 best response

Accepted Solutions
best response confirmed by olopa67 (Brass Contributor)
Solution

@olopa67 

I guess here

image.png

it shall be ... &"recepe card'!L10" , not .. &"recepe card'!&(L10)

View solution in original post