简体   繁体   中英

Building cell reference to another file from cell values

I'm not sure if this is even possible. I need to make references to cells in multiple other Excel files.

To make it simple: I can get the data I require with the following string, in Sheet1 of my workbook:

=SUM('C:\Folder\[Person''s Tracker.xls]April 2014'!$A$1:$A$54)"

It's referencing another workbook to SUM tracking data.

However, I want to dynamically build this string using cell references from another sheet:

  • "C:\\Folder\\" is stored as text in Sheet2, cell C5.
  • "[Person''s Tracker.xls]" is stored as text in Sheet 2, cell D5.
  • "April 2014" is stored as text in Sheet 2, cell E5.

I've tried various combinations of CONCATENATE and INDIRECT but always end up with an error. Any ideas?

Managed to sort it with the help of "me how".

Essentially, used CONCATENATE to string the file path and sheet name together in between to single quotes, inside an INDIRECT function which added the cell reference to the end.

Eg: =SUM(INDIRECT(CONCATENATE("'", A1, A2, A3,"'!") & $C$2:$C$19))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM