Results 1 to 2 of 2

Use Match to locate a item in an array

Threaded View

  1. #1
    Registered User
    Join Date
    12-11-2003
    Location
    Beijing
    Posts
    2

    Use Match to locate a item in an array

    Hi:

    I wrote a piece of code in which i used a two dimension array. I wanted to locate a certain value in this array. Since i know one dimension of where the value is stored i want to fix this dimension and simply look at the other dimension.

    The following is the code but it is no good.
     Dim aa(3, 3) As String
    For n = 1 To 4
    For m = 1 To 4
    aa(m - 1, n - 1) = n & m
    Next m
    Next n
    
    
    ' Look for where "23" is stored by lock the second dimension.
    MsgBox Application.WorksheetFunction.Match("23", aa(, 2), 0)


    Could anybody help me out?

    Thanks
    Last edited by VBA Noob; 10-15-2007 at 06:40 PM.
    Wang Chris DP

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