Andreas Hermle
asked on
Add a substring to an existing hyperlink address using VBA
Dear Experts:
I would like to run a macro that performs the following task
Loop thru all the cells in Column F.
... As soon as the macro hits a grey shaded cell (RGB 250, 250, 250) ...
... go three cells to the left (Column C) ...
... and add the string '_copy' at the end of the stored hyperlink (but before the file extension) that is stored in that cell
For example:
First grey cell in F 147
The hyperlink in C 147 has the following address : C:\myfolder\47-338-44-09.t if
The new hyperlink address after running the macro will be: C:\myfolder\47-338-44-09_c opy.tif
That is all of the stored hyperlinks have the following make-up
C:\myfolder\##-###-##-##.t if
After running the macro the hyperlink addresses will say:
C:\myfolder\##-###-##-##_c opy.tif
Help is much appreciated.
Thank you very much in advance.
Regards, Andreas
I would like to run a macro that performs the following task
Loop thru all the cells in Column F.
... As soon as the macro hits a grey shaded cell (RGB 250, 250, 250) ...
... go three cells to the left (Column C) ...
... and add the string '_copy' at the end of the stored hyperlink (but before the file extension) that is stored in that cell
For example:
First grey cell in F 147
The hyperlink in C 147 has the following address : C:\myfolder\47-338-44-09.t
The new hyperlink address after running the macro will be: C:\myfolder\47-338-44-09_c
That is all of the stored hyperlinks have the following make-up
C:\myfolder\##-###-##-##.t
After running the macro the hyperlink addresses will say:
C:\myfolder\##-###-##-##_c
Help is much appreciated.
Thank you very much in advance.
Regards, Andreas
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Joop,
works like a charm, thank you very much for your great and professional support.
Regards, Andreas
works like a charm, thank you very much for your great and professional support.
Regards, Andreas
ASKER
thank you very much for your swift help. I will test the code tomorrow and let you know.
Again, thank you very much for your professional help.
Regards, Andreas