+ Reply to Thread
Results 1 to 5 of 5

Loop Through Rows faster

  1. #1
    Registered User
    Join Date
    08-16-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    59

    Loop Through Rows faster

    Hi All,

    I need help with my code to make it loop faster. I have this code in my Format Report routine. My report runs and then the Formatting is done at the end.

    It inserts a column, HLINK as the first field and then loops from first row to the last row containing data to insert a hyperlink on the first column. Since the number of rows maybe from 1000 or more,
    it takes a while to loop. Is there a way to make this fast?

    Please Login or Register  to view this content.
    Thanks,
    Rollin

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Loop Through Rows faster

    Rollin

    Couldn't you use the HYPERLINK function for the hyperlink?

    If you could then you wouldn't need to loop.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-16-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: Loop Through Rows faster

    Hi,
    Thanks. Can you please explain how my code would work with the HYPERLINK function?

    an example would help.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Loop Through Rows faster

    Not sure about your exact URL but it might look something like this.
    Please Login or Register  to view this content.
    Note, you might not need the font formatting part.

  5. #5
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    274

    Re: Loop Through Rows faster

    Adding "Application.ScreenUpdating = False" before the loop starts might help. Also setting the worksheet recalculation to False might help.

+ 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] For Each Loop (Make it Faster)
    By ExcelQuestion in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-03-2015, 11:36 PM
  2. [SOLVED] faster way to loop
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-22-2015, 12:09 PM
  3. Is there a faster way than a loop to delete rows that satisfy a criteria
    By mortphil in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-28-2014, 12:14 PM
  4. Is it possible to get rid of this loop to make the code faster?
    By mhw1129 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2011, 09:03 AM
  5. Make loop run faster
    By losmi8 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-20-2010, 01:11 AM
  6. Making a simple loop faster
    By gummi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-23-2008, 07:07 PM
  7. [SOLVED] Faster For-Next Loop?
    By dgp@dodgeit.com in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2005, 06:06 PM

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