Forum Discussion

julietellis's avatar
julietellis
Copper Contributor
Nov 19, 2020
Solved

How to link multiple excel cells to external file

Hi there, I am looking to upload a spreadsheet of data to an online science database.  To do this, I need to link each cell in a column (of around 600 cells) each to their own relevant document. I ...
  • MindreVetande's avatar
    Nov 19, 2020

    julietellis 

    Hi.

    Assume your link looks something like this:

    ='C:\tmp\[doc0001.xlsx]Sheet1'!$A$1

    And you want to change the doc0001 to 0002 and so on.

    This is one way to glue the address together:

    =CONCATENATE("'C:\tmp\[doc",TEXT(ROW(A1),"0000"),".xlsx]Sheet1'!$A$1")

    Copy down

    But this is just a string and Excel wont understand that it is an address that you want to link to. In you wrap the formula within "INDIRECT" you tell excel that it is an address/Link

    =INDIRECT(CONCATENATE("'C:\tmp\[doc",TEXT(ROW(A1),"0000"),".xlsx]Sheet1'!$A$1"))

    Unfortunately INDIRECT() has a big disadvantage. The file you link to must be open....

     

    On  way to handle this is to make the link text (including the 😃

    =CONCATENATE("='C:\tmp\[doc",TEXT(ROW(A1),"0000"),".xlsx]Sheet1'!$A$1")

     

    Copy down as many rows as necessary.

     

    Now. Copy the column with addresses and paste it as text

    Start->paste->paste special->as text

    Now you will have the addresses, but no link in each cell.

    Select your column again and do a search and replace (Ctrl+H). Seach after Equals sign (=) and replace with Equals sign (=). This will force excel to accept every cell as anew entry and convert you text to a real formula/link

Resources