+ Reply to Thread
Results 1 to 3 of 3

Loop needed to edit links based on data in cells

  1. #1
    Registered User
    Join Date
    10-02-2013
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Loop needed to edit links based on data in cells

    Hi, I have been scouring the internet trying to find a solution to this so any help would be appreciated.

    I have a workbook (wbCP) which pulls data from several different workbooks. I have written some code that updates a few selected links with data pulled form a separate workbook (wb).

    In workbook (wb), all the old links are listed in Column B, from Cell 2 downwards for x number of occasions, depending on how many links need updating. At the same time, all the new links are listed in Column A from cell 2 downwards.

    I have managed to get the code to update the relevant links from Cell B2 to A2, but I don't know to loop it so that it then progresses to finding the link in B3 and updating it to the link in A3 and so on and so forth...... until the end of the dynamic range is reached.

    Any help is greatly appreciated.

    Code is below:

    Please Login or Register  to view this content.
    Last edited by Renoix; 05-23-2016 at 02:36 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,063

    Re: Loop needed to edit links based on data in cells

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    10-02-2013
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Loop needed to edit links based on data in cells

    Apologies - post updated.

+ 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. [SOLVED] VBA to loop within a loop of multiple blocks of data (currentregion) ... Expert needed
    By Jim885 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2016, 08:28 PM
  2. [SOLVED] Help Edit Loop that deletes Rows based on Date condition.
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2015, 02:16 PM
  3. Edit edit links macro to automate sheet selection
    By sds1126 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2015, 12:27 PM
  4. How to dynamically update links based on data (not Cells) in PowerPoint via Excel?
    By pats2kdynasty in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-25-2012, 01:10 PM
  5. Replies: 0
    Last Post: 06-04-2012, 07:21 AM
  6. Replies: 0
    Last Post: 05-27-2010, 02:04 PM
  7. Loop cells in column and edit data
    By Phrone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-17-2009, 07:45 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