+ Reply to Thread
Results 1 to 1 of 1

Macro to create hyperlinks with URL set

  1. #1
    Registered User
    Join Date
    05-24-2014
    Posts
    1

    Lightbulb Macro to create hyperlinks with URL set

    Hi all,

    I am new to creating macros and have gotten a little ways with this one, but having problems knowing how to advance to the next row/cell.

    I need a macro that will copy a URL from one cell, then use it to create a hyperlink in another cell.

    So far, I have this to start with (I recorded copying the URL from J2 and pasting it into the ADD HYPERLINK function for cell I2:

    Range("J2").Select
    ActiveCell.Copy
    Range("I2").Select
    ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
    "http://www.findagrave.com/cgi-bin/fg.cgi?page=gr&GRid=62927511"

    What I need is a way to loop this from J2/I2 through J730/I730, with column I containing unique URL addresses, so rather than the macro specifying the data to add, I want it to just paste what it copied from each cell in column J. I would also like it to skip to the next J cell if the current J cell is null. So it would be something like:

    Select J cell
    If not null, Copy contents
    Select I cell
    Select Hyperlink, paste contents into address
    Select next sequential J cell
    If not null, Copy Contents...
    Select next I cell
    etc...

    The macro should only copy/paste when J cell is not null, and it should paste to the same row I cell (if J20 not null, copy to I20 hyperlink address, skip null J21, if J22 not null, copy to I22 hyperlink address...etc...)

    Hope I've made this clear enough.

    Any takers? Sure appreciate any assistance I can get with this. It will take me forever to do this by hand.
    Last edited by Chicahua1958; 05-24-2014 at 01:04 AM. Reason: Add add'l info

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to create hyperlinks between sheets
    By Ashok Dsouza in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2012, 10:18 AM
  2. [SOLVED] Macro to create Hyperlinks of a new page
    By digixu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-16-2012, 10:53 AM
  3. Macro to create hyperlinks to files.
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-31-2012, 06:37 AM
  4. macro to create hyperlinks?
    By taran_453 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2011, 02:32 PM
  5. Using a macro to create hyperlinks
    By PChav in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-21-2008, 01:42 PM

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.6.0 RC 1