+ Reply to Thread
Results 1 to 2 of 2

Need help in using 'For' function with arrays

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    mumbai
    MS-Off Ver
    Excel 2003
    Posts
    5

    Need help in using 'For' function with arrays

    Hi,

    General For Loop function in VBA excel macro starts with:

    Dim i

    For i = 1 To 5
    ..
    .......

    Is it possible to assign an array to FOR func.?

    example:

    For i = {10; 28; 35; 40; 56}

    so i can assign differnet values to 'i'.

    If yes, then what shall be correct code to define it?

    Thank you in advance.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Need help in using 'For' function with arrays

    Try something like

    Please Login or Register  to view this content.
    where v(i) will return the value from the array.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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