Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Offset/match returns #value error | Excel Worksheet Functions | |||
Lookup returns blank if no match | Excel Worksheet Functions | |||
Vlookup returns incorrect match | Excel Discussion (Misc queries) | |||
Application.Match | Excel Programming | |||
Application.Match | Excel Programming |