+ Reply to Thread
Results 1 to 5 of 5

Trouble with nested for loops

  1. #1
    Registered User
    Join Date
    01-22-2019
    Location
    Nova Scotia, Canada
    MS-Off Ver
    2007
    Posts
    22

    Trouble with nested for loops

    Good afternoon,

    I'm trying to get my macro to paste row j from "master" workbook into cell A12 of sheet1 in each workbook j in E:\DIRECTORY\. The files in the directory are sorted in the same order as the rows to be copied in master. Row 1 in master goes to workbook 1 (A12 in sheet1), row 2 in master goes to workbook2 (A12 in sheet 1) etc. Below is my attempt, but it keeps looping through files until every file gets every row. I only want one row per file:

    Please Login or Register  to view this content.
    Last edited by excel_novice2019; 01-25-2019 at 06:12 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,572

    Re: Trouble with nested for loops

    updated..........
    Last edited by protonLeah; 01-25-2019 at 08:01 PM.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    01-22-2019
    Location
    Nova Scotia, Canada
    MS-Off Ver
    2007
    Posts
    22

    Re: Trouble with nested for loops

    Sorry. Adjusted

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,572

    Re: Trouble with nested for loops

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-22-2019
    Location
    Nova Scotia, Canada
    MS-Off Ver
    2007
    Posts
    22

    Re: Trouble with nested for loops

    Quote Originally Posted by protonLeah View Post
    Please Login or Register  to view this content.
    Thank Proton Leah!

+ 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. Nested For Each loops
    By MeggieDoodles in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2015, 04:21 PM
  2. [SOLVED] Nested IF loops More than 7 Need Help
    By EricSomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-31-2013, 02:25 PM
  3. Nested Do Loops
    By ross88guy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-08-2010, 09:10 AM
  4. VBA - Nested loops
    By roheba in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-09-2010, 01:42 PM
  5. Having trouble with loops in a macro.
    By caliskier in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-20-2007, 12:09 PM
  6. [SOLVED] Many Nested loops
    By naterator in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2006, 05:45 PM
  7. Nested with loops
    By Clair in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-20-2006, 03:35 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