+ Reply to Thread
Results 1 to 3 of 3

worksheetfunction.match giving run time error '1004'

  1. #1
    Registered User
    Join Date
    07-15-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    worksheetfunction.match giving run time error '1004'

    I'm trying to use the match function to try to cross reference some data, but I get:

    Runtime Error '1004'
    Unable to get the match property of the worksheet-function class

    I know why I'm getting the error. I'm getting the error because the data I'm trying to match is not in the array.

    How can I use this function to flag data that it cannot find or isn't part of the array being indexed?

    note: the following code is in a for loop which loops through rows and colums (i and j) of the spreadsheet.

    Please Login or Register  to view this content.
    Last edited by romperstomper; 07-15-2010 at 04:42 PM. Reason: Added code tags

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: worksheetfunction.match giving run time error '1004'

    You can store the match part in a Variant if you use Application.Match instead:
    Please Login or Register  to view this content.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    07-15-2010
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: worksheetfunction.match giving run time error '1004'

    Excellent .. worked like a charm. Thanks for the super quick reply.

+ 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