+ Reply to Thread
Results 1 to 4 of 4

Thread: Macro to add Hyperlink to 30.000 lines

  1. #1
    Registered User
    Join Date
    04-29-2010
    Location
    Bakel, Holland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Wink Macro to add Hyperlink to 30.000 lines

    Hello,

    I have an Excel sheet with a lot off adresses and the location off the drawings
    Kolom B: AALBERSESTRAAT
    Kolom C: 12
    Kolom D: kii024\001\001\00000001.TIF

    B= Street
    C= Streetnumber
    D= location of drawing

    In kolom D are standing the location of the actual drawing, in total it are almost 30.000 rows.

    WHAT DO I WANT TO MAKE?
    1. Copy the the location standing in D
    2. Right click on the cell D
    3. in the Hyperlink paste
    4. go to the next line
    5. proceed to all 30.000 lines.

    I already tried it by record macro and got this: (Dutch) but it only changes line 2 and 3.

    Sub verwijzingnaartekening()

    ActiveCell.FormulaR1C1 = "kii024\001\001\00000001.TIF"
    Range("D2").Select
    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
    "kii024/001/001/00000001.TIF", TextToDisplay:="kii024\001\001\00000001.TIF"
    Range("D3").Select
    ActiveCell.FormulaR1C1 = "kii024\001\001\00000001.TIF"
    Range("D3").Select
    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
    "kii024/001/001/00000001.TIF", TextToDisplay:="kii024\001\001\00000001.TIF"
    Range("D4").Select
    End Sub
    Last edited by marco@verstopt.nl; 05-07-2010 at 04:28 AM. Reason: Solved

  2. #2
    Valued Forum Contributor
    Join Date
    12-03-2009
    Location
    Providence RI
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    260

    Re: Macro to add Hyperlink to 30.000 lines

    If this is a one time thing do you need a macro? Put =HYPERLINK($D1) in E1 and copy all the way down and you're done.
    Last edited by Dulanic; 04-29-2010 at 07:52 AM.

  3. #3
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007, 2010
    Posts
    25,777

    Re: Macro to add Hyperlink to 30.000 lines

    Welcome to the forum, marco.

    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.

    Thanks.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    04-29-2010
    Location
    Bakel, Holland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Red face Re: Macro to add Hyperlink to 30.000 lines

    Quote Originally Posted by Dulanic View Post
    If this is a one time thing do you need a macro? Put =HYPERLINK($D1) in E1 and copy all the way down and you're done.
    Thanks, this does solve the problem.

    It's so simmple.....

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0