+ Reply to Thread
Results 1 to 3 of 3

Nested for-loop

  1. #1
    Registered User
    Join Date
    01-12-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    13

    Nested for-loop

    Hi, I have the following code:

    Please Login or Register  to view this content.
    It works perfectly, but there's just one thing I don't understand.

    There are 55 occupied rows in total. If I let i and j = 55 then the code only runs for 33 rows. I have to let i and j = 80 in order for it to complete all the occupied rows (up to 55).

    Does anyone understand why this is the case?

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Nested for-loop

    can you please upload the worksheet?
    Click on the star if you think I helped you

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Nested for-loop

    Does Sheet "Data" have the 55 occupied rows? Or Sheet "Fin Ratios"?

+ 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. VBA Nested For Loop
    By jbuckets in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-15-2012, 10:49 PM
  2. Next without For error in nested loop - Escaping a Nested Loop?
    By BeneRich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2012, 06:38 PM
  3. For each loop nested; getting stuck on one cell in first iteration of nested loop
    By Excel_vba in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-22-2009, 11:54 AM
  4. Nested Loop/Check
    By DallasW in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-11-2008, 09:12 AM
  5. nested Loop
    By iturnrocks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2008, 07:26 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