Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kim Kim is offline
external usenet poster
 
Posts: 284
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number in cell increase with increase in font size. Value increases with increase in font.[_2_] Excel Discussion (Misc queries) 2 August 9th 07 01:58 PM
script to hyperlink and reference a cell value in the hyperlink Natasha D. Excel Programming 5 May 17th 06 07:43 PM
How do I turn a VBA script on and off with an entry in a cell ffzeus Excel Programming 2 February 17th 06 12:52 AM
how to increase the number by 1 from the cell above? the worker Excel Worksheet Functions 2 November 18th 04 01:39 AM
Script to add hyperlink to Excel cell containing text John Doe[_5_] Excel Programming 4 October 11th 04 02:26 AM


All times are GMT +1. The time now is 02:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"