+ Reply to Thread
Results 1 to 5 of 5

For Loop Array

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    13

    For Loop Array

    First of all YAY the forum is finally back to normal! Thank you

    So this is probably exceptionally simple but maybe I've just been doing too much coding where everything looks the same.

    Background:
    I'm trying to write a simple macro to create an input to Unix for something a program I'm calling and giving all of it's inputs, over and over again. I'm automating this so I'm not entering in the 100k+ runs manually. I'm stuck on getting vba to output the array to the sheet properly.

    Please Login or Register  to view this content.


    So if you enter in 2 for the files and 3 for the runs it should output something that loops like:

    example_output.xlsx

    Any help would be appreciated. Thanks

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: For Loop Array

    can you explain the logic ?
    If solved remember to mark Thread as solved

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,046

    Re: For Loop Array

    Maybe this:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: For Loop Array

    Another Option:-
    Please Login or Register  to view this content.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    45,046

    Re: For Loop Array

    In light of MickG's response, a slightly shorter/neater version:

    Please Login or Register  to view this content.

    Regards, TMS

+ 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. [SOLVED] Array size unknown until the first "loop", how to correction dim/redim the array
    By menichols74 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-15-2013, 10:04 AM
  2. Loop new messages containing a table, populate a dynamic array, paste array to Excel
    By laripa in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 05-19-2013, 07:20 AM
  3. [SOLVED] array loop that loops through another array
    By Bob1980 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-19-2013, 02:42 PM
  4. Using an array loop.
    By lauren_wing in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-22-2010, 02:24 PM
  5. Loop through an array
    By Ricardo9211 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-12-2009, 08:52 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