+ Reply to Thread
Results 1 to 2 of 2

Index and Match Not working

Hybrid View

  1. #1
    Registered User
    Join Date
    12-15-2014
    Location
    singapore
    MS-Off Ver
    2013
    Posts
    45

    Index and Match Not working

    Hi I have a problem returning a value using index and match. May I know what is the problem? Thanks

    Private Sub lookup()
    Sheets("Data").Select
    Cells(4, 3) = Application.Index(Worksheets("Hello World").Range("A1:Z100"), Application.Match(Worksheets("Data").Cells(4, 1), Worksheets("Hello World").Range("A1:Z100")), Application.Match(Worksheets("Data").Cells(2, 2), Worksheets("Hello World").Range("A1:Z100")))
    End Sub
    In my Data sheet Cells(4,3) i am suppose to look for a value of row( 20141101) and column (waveheight) in the "Hello World" Worksheets. The respective position of the value i am searching for is at the H2 (value 1.2) but the result return is #N/A. Thanks

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Index and Match Not working

    1. You are over complicating this.

    I would not use index within VBA, what benifits does it give you?

    application.index(A1:A1000,25)
    is the same as
    range("A1").offset(25-1,0).value
    or
    range("A" & 25).value)
    Both my solutions will be a lot faster than using application.index



    2. The Match function is usually used with a zero.
    MATCH(A6,$B$2:$B$4,0)
    3. However Application.match is very slow consider using find,


        With Range("B1:B1000")
    Set rngfind = .Find("12", .Cells(1, 1), LookIn:=xlValues, lookat:=xlWhole)
        LR = rngfind.offset(0,1).value
        End With
    Last edited by mehmetcik; 12-16-2014 at 12:26 AM.

+ 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] Working INDEX MATCH with SEARCH, but I need to add another MATCH to the formula!
    By DaveBre in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-11-2014, 01:03 AM
  2. Correct/Working (Index,Match) formula not working between cells
    By barnerd in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 02-11-2014, 01:20 PM
  3. Index Match NOT Working
    By KellsAtl in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-13-2013, 07:48 PM
  4. INDEX MATCH MATCH working great and then failing on me.
    By HeikEve in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-25-2013, 01:40 PM
  5. Replies: 2
    Last Post: 05-24-2013, 09:32 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