+ Reply to Thread
Results 1 to 2 of 2

application.match Returns what

Hybrid View

Guest application.match Returns what 02-16-2005, 03:20 PM
Guest Re: application.match Returns... 02-18-2005, 10:06 AM
  1. #1
    ben
    Guest

    application.match Returns what

    I can not find any documentation on application.Match method
    what is the proper syntax, what does it return
    bagno = Search String
    rng = "range to lookup"
    I wish to return the the row of a found item or return a null if not found
    in a certain range or would you reccomend find instead

  2. #2
    Dick Kusleika
    Guest

    Re: application.match Returns what

    Ben

    It's the same syntax as the worksheet function.

    Match(bagno,RangeObject,TrueOrFalse)

    so an example might be

    x = Application.Match(bagno,Sheet1.Range("A1:A10"),False)

    See also, here

    http://www.*****-blog.com/archives/2...nction-method/

    Match will return the row relative to the range. If you provide
    Range("E50:E60"), and Match returns 1, it's really row 50. If you want the
    actaul row, use the Find method

    Dim rFound As Range

    rFound = Sheet1.Range("E50:E60").Find(What::=bagno)

    If Not rFound Is Nothing Then
    x = rFound.Row
    End If

    More info on Find
    http://www.*****-blog.com/archives/2...e-find-method/

    --
    **** Kusleika
    Excel MVP
    Daily Dose of Excel
    www.*****-blog.com

    ben wrote:
    > I can not find any documentation on application.Match method
    > what is the proper syntax, what does it return
    > bagno = Search String
    > rng = "range to lookup"
    > I wish to return the the row of a found item or return a null if not
    > found in a certain range or would you reccomend find instead




+ 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