script to increase last number in cell entry for hyperlink
Hi
I have an excel sheet with 4,000 rows each having a record of a picture. I need to hyperlink a cell entry in each row to open the picture when it is clicked. I can do this through insert hyperlink command but don't want to do it 4,000 times! Is there a way to do this with vba? Either from a macro button or running a script that would increment the file name by 1 digit for each row i.e. Filepathpicture1 (set by hyperlink) filepathpicture2 filepathpicture3 and so on with the script changing the picture number. Thanks |
script to increase last number in cell entry for hyperlink
VBA is really not needed he
In A1 enter: C:\Documents and Settings\Owner\My Documents\My Pictures\100_006 In B1 enter: =ROW()&".jpg" In C1 enter: =HYPERLINK(A1 & B1) This will hyperlink to 100_0061.jpg Just copy A1 thru C1 down the column to increase the numerical sequence. -- Gary''s Student - gsnu200763 "kim" wrote: Hi I have an excel sheet with 4,000 rows each having a record of a picture. I need to hyperlink a cell entry in each row to open the picture when it is clicked. I can do this through insert hyperlink command but don't want to do it 4,000 times! Is there a way to do this with vba? Either from a macro button or running a script that would increment the file name by 1 digit for each row i.e. Filepathpicture1 (set by hyperlink) filepathpicture2 filepathpicture3 and so on with the script changing the picture number. Thanks |
All times are GMT +1. The time now is 11:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com