Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default 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"),Fal se)

See also, here

http://www.dicks-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.dicks-blog.com/archives/2...e-find-method/

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Offset/match returns #value error Geoff Excel Worksheet Functions 8 May 7th 08 03:56 AM
Lookup returns blank if no match Nolene Excel Worksheet Functions 9 October 4th 06 06:47 PM
Vlookup returns incorrect match Smichaud Excel Discussion (Misc queries) 2 November 30th 04 10:51 AM
Application.Match [email protected] Excel Programming 5 September 2nd 04 04:22 PM
Application.Match [email protected] Excel Programming 0 September 2nd 04 12:07 AM


All times are GMT +1. The time now is 09:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"