+ Reply to Thread
Results 1 to 3 of 3

Looping through multiple cell ranges

  1. #1
    Registered User
    Join Date
    05-26-2015
    Location
    Copenhagen
    MS-Off Ver
    2010
    Posts
    28

    Looping through multiple cell ranges

    Hello i have the following VBA code:

    Please Login or Register  to view this content.
    What i want to do is i want to create a loop (i suppose) to complete the task above a number of times.

    So lets say that i want to loop through i=1:X
    Then the name LL_1B, is LL_iB,
    The range needs to be upped 42 for each loop so Range("B(2+(i-1)*42) : U(42+(i-1)*42) ")
    etc

    How do i write this in code that VBA understand?

  2. #2
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Looping through multiple cell ranges

    Try these

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    !If all your troubles are solved, then so is the thread. Show this by marking it so using thread tools at the top of the page.
    If I helped do this, then please show your appreciation by awarding rep points.
    <------ Button for that is over there

  3. #3
    Registered User
    Join Date
    05-26-2015
    Location
    Copenhagen
    MS-Off Ver
    2010
    Posts
    28

    Re: Looping through multiple cell ranges

    Thanks a bunch,
    Final code is:

    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. Looping on a multiple ranges of data
    By Trent136 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2014, 12:10 AM
  2. [SOLVED] Looping through cell ranges in multiple worksheets and prevent saving if cell value empty
    By Spritz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-22-2013, 11:24 AM
  3. [SOLVED] Looping through ranges in worksheet
    By stevow in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-19-2012, 11:06 AM
  4. Looping Named Ranges
    By jensenleesen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-23-2011, 10:07 PM
  5. looping calculation between two ranges
    By form in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-15-2010, 11:43 AM
  6. Looping through dynamic ranges from multiple worksheets
    By TechWrangler in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-08-2006, 03:20 PM
  7. [SOLVED] Looping in VB with cell ranges
    By Freeman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-22-2006, 08:20 AM
  8. Looping Ranges
    By purple_m in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-14-2005, 08:24 AM

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