+ Reply to Thread
Results 1 to 4 of 4

Do Loop with Variable Range

  1. #1
    Registered User
    Join Date
    07-16-2013
    Location
    operation
    MS-Off Ver
    Excel 2010
    Posts
    15

    Do Loop with Variable Range

    The following macro is in a file that I inherited and I would like to change it so that it will stop after reaching the last row of data (blank after that). I am new to Macros and it looks like there is a lot of junk in this macro, but right now I just want to limit it to the data range which changes daily when this is run. Any help is appreciated.
    Please Login or Register  to view this content.
    Last edited by Austex_egger; 07-24-2013 at 03:36 PM.

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

    Re: Do Loop with Variable Range

    The last row of data in which sheet in which workbook?

    PS Can you use code tags when posting code?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-16-2013
    Location
    operation
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Do Loop with Variable Range

    Sorry about that. The last row of data in "Hotlist Template v2_1"

    Thanks for the tip on using Code Tags!

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

    Re: Do Loop with Variable Range

    This would loop through column B starting at 2 and stepping 13 rows each iteration.

    I've shown how you could use I in the first few lines.

    I can't figure out the rest of the code, it's seems to jump about a fair bit, so I'm not sure how it would fit in there.

    Please Login or Register  to view this content.

+ 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. Why did an inner loop variable start overwriting the outer loop range suddenly?
    By 111StepsAhead in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-16-2012, 03:24 PM
  2. Referencing variable Range in a loop
    By Samirkc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2006, 07:55 AM
  3. [SOLVED] How to reference variable range in a loop
    By Samirkc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-13-2006, 11:15 AM
  4. Setting a range within a loop variable for copy/paste
    By Craig in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2005, 12:10 PM
  5. [SOLVED] Setting a range within a loop variable for copy/paste
    By Craig in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-20-2005, 06:25 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