Increment the hyperlink

ujikol -  
jee pee Posted messages 9441 Registration date   Status Moderator Last intervention   -
Hello,

I am looking to increment hyperlinks with a variable to open folders.
I have column A with variables 1 to 5000.
I have column B with a "PDF" button that opens the corresponding file 1 to 5000.
I have created column C with a "DOSS" button to open a Windows folder window for the corresponding 1 to 5000 storage location, instead of the corresponding storage.
I have linked the path for example:
\\srvfichiers\Production_commun\pdf\1125
it works very well but it is impossible to increment the folder number
and replace "1125" with the variable from column A, e.g. "1125" would become $a$1125
\\srvfichiers\Production_commun\pdf\$a$1125

but it does not work.

so at this point the only solution is to rename the links one by one
a titan’s work.

(thanks, by the way, for a hyperlink to a file the incrementing works, but not for a link to a folder)

Does anyone have a trick?

Thanks in advance

6 answers

  1. jordane45 Posted messages 30427 Registration date   Status Moderator Last intervention   4 831
     
    Hello
    You need to create a formula that concatenates the path with the column..
    ="\srvfichiers\Production_commun\pdf\" & $a1125 


    --
    .
    Best regards,
    Jordane
    0
  2. jee pee Posted messages 9441 Registration date   Status Moderator Last intervention   9 981
     
    Hello,

    We should use a formula that concatenates a string + variable
    =""\\srvfichiers\Production_commun\pdf\"" & $A$1125


    0
  3. ujikol
     
    Thank you for the quick reply

    Unfortunately, it doesn’t work well
    0
    1. jordane45 Posted messages 30427 Registration date   Status Moderator Last intervention   4 831
       
      Be careful with Jeepee's answer, he forgot to remove the dollar symbol at the line number level.
      Which means you can't increment the formula automatically.
      0
  4. ujikol
     
    Thank you

    Well .... neither

    I tested several versions with and without $ and &

    With opening a file it works

    On the other hand, to open a folder, it doesn't work

    Pfff
    0
    1. jee pee Posted messages 9441 Registration date   Status Moderator Last intervention   9 981
       
      We should give us an example of the file to upload on cjoint.fr and put the generated link on the forum.
      0
  5. ujikol
     
    Attached excerpt of the file

    Colonne A B, no increment problem, opening Word or PDF file
    Column C manual increment OK
    However column D (link to open Windows folder
    The display increments (stretch + CTRL key) but the link target does not increment
    Display from 11125 to 11133
    but all targets remain at 11125
    0
    1. jee pee Posted messages 9441 Registration date   Status Moderator Last intervention   9 981
       
      I don’t see how you initialize D. But why not use the same type of formula as in B, which gives
      =HYPERLINK(CONCATENATE("\\srvfichiers\Production_commun\OMP pdf\" & C4), C4)
      0
  6. ujikol
     
    WELL DONE

    Indeed with "CONCATENATE" it works perfectly!

    Thank you very much
    0
    1. jee pee Posted messages 9441 Registration date   Status Moderator Last intervention   9 981
       
      Finally CONCATENATE() with & is a belt and suspenders The logic would be =HYPERLINK(CONCATENATE("\\srvfichiers\Production_commun\OMP pdf\";C4);C4) or =HYPERLINK("\\srvfichiers\Production_commun\OMP pdf\"&C4;C4)
      0