+ Reply to Thread
Results 1 to 3 of 3

Iterate through Array While in For Each loop

  1. #1
    Registered User
    Join Date
    04-30-2008
    Posts
    67

    Question Iterate through Array While in For Each loop

    Hello All,

    I've got a piece of code that works great, but I'm trying to turn it into a function where I can use it with multiple files.

    What I'm doing here is parsing a JSON file into a worksheet. The JsonConverter example shows it looking through a defined list of "values":

    Please Login or Register  to view this content.
    For each file it's looking at, I'd like to see it iterate through the first row of its respective sheet. I've got the values of the header row of that sheet in an array (DirArray):

    Please Login or Register  to view this content.
    But I don't know how to iterate through that while it's going through the For Each statement that populates the sheet.

    I'd like to be able to do something like this:

    Please Login or Register  to view this content.
    Thanks for any help. Seeing how to do this would be useful.

    Full Sub for reference:

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    04-30-2008
    Posts
    67

    Re: Iterate through Array While in For Each loop

    Maybe something like this (although it doesn't work)?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-30-2008
    Posts
    67

    Re: Iterate through Array While in For Each loop

    Figured it out:

    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. [SOLVED] For loop to iterate Cell Row in a Formula
    By Excelerate1 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-18-2017, 08:15 PM
  2. [SOLVED] Iterate over two index variables to reorder an array
    By samot79 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-22-2016, 09:31 AM
  3. Loop through list, add to Array, count number of occurrences, clear array
    By HalPlz in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-11-2016, 09:42 PM
  4. Iterate through Worksheets Building an Array
    By MaterialMaster in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-12-2014, 04:34 PM
  5. [SOLVED] Iterate Array Names with Integers
    By AlvaroSiza in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-06-2014, 10:32 AM
  6. 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
  7. to iterate within selected range and loop
    By dazzwilliams in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-22-2011, 01:27 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