Forum Discussion

BenjaminFRT's avatar
BenjaminFRT
Copper Contributor
Feb 03, 2023

create function value link

Hi,

Today  I use this type of link, and it's good

=@'W:\_Devis\Devis 230505.xlsx'!Toto  ----> Toto is a predef cell

but I want to generate the link like something like this

=CONCAT("@'W:\_Devis\Devis ";B2;".xlsx'!Toto") ---> with the value of B2 is "230505"

Do you have and idea ?

Thanks for your help

 

 

  • BenjaminFRT's avatar
    BenjaminFRT
    Copper Contributor
    The cell return the text :
    @'W:\_Devis\Devis 230505.xlsx'!Toto
    not the value of the cell =(
  • Rodrigo_'s avatar
    Rodrigo_
    Steel Contributor
    try this:
    =INDIRECT(CONCAT("@'W:\_Devis\Devis ";B2;".xlsx'!Toto"))
      • BenjaminFRT's avatar
        BenjaminFRT
        Copper Contributor
        I have try without concat by using &
        =INDIRECT("@'W:\_Devis\Devis "&B2&".xlsx'!Toto")
        same result an over idea ?
    • BenjaminFRT's avatar
      BenjaminFRT
      Copper Contributor
      Thanks but,
      =INDIRECT(CONCAT("[";B2;".xlsx]Feuil1!$O$6")) is ok
      but with th right link it's not ok ? an idea ?
      • BenjaminFRT's avatar
        BenjaminFRT
        Copper Contributor
        $O$6 or Toto is ok
        path with or with space same problem, idem by using operator & or concat
        same directory with file open with "[" and "]" ok, but when you close the file.. error
    • BenjaminFRT's avatar
      BenjaminFRT
      Copper Contributor
      INDIRECT is ok if the file is open, it isn't ok for me

Resources