+ Reply to Thread
Results 1 to 3 of 3

Loop, if found, increase range variable.

  1. #1
    Registered User
    Join Date
    01-09-2011
    Location
    Gabrieola
    MS-Off Ver
    2003,2007
    Posts
    42

    Loop, if found, increase range variable.

    The range is unknown until it loops through a specified range A1:F20. Once a value is found while looping, add that range to the range variable.

    thanks for looking.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525

    Loop through range and add range to union range.

    Select A1 from range("A1:F20")
    Please Login or Register  to view this content.
    Find the example here.
    http://www.xlorate.com/excel-vba-loo...e%20to%20Range


    Also a YouTube vid
    https://www.youtube.com/watch?v=J3v8...ature=youtu.be

  3. #3
    Registered User
    Join Date
    01-09-2011
    Location
    Gabrieola
    MS-Off Ver
    2003,2007
    Posts
    42

    Re: Loop, if found, increase range variable.

    Wow, Thanks a lot for the quick response, this is just what I was looking for.

+ 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. Replies: 11
    Last Post: 08-23-2014, 01:28 PM
  2. Increase copy and paste range after each loop
    By JakeSn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-27-2014, 04:34 AM
  3. [SOLVED] For...Next loop - trying to have named range increase by count of 1
    By seaveegee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-18-2012, 02:06 PM
  4. 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
  5. How to exit a loop once the value is found in the range
    By Suety in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-28-2010, 01:30 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