Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using WorksheetFunctions in Excel Macros
I want to use the Excel Worksheet Function Match to find
an entry in a range. When attempting to execute, I get error code 1004. Unable to get the Match Property of the Worksheet function class. ndx = Application.WorksheetFunction.Match(aDate, "AMGN! Date") What is not available? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using WorksheetFunctions in Excel Macros
Hi
this is probably our second parameter. Is this a defined name?. the following should work: ndx = Application.WorksheetFunction.Match(aDate, Range("A1:A100")) if aDate exists within your range -- Regards Frank Kabel Frankfurt, Germany Ken wrote: I want to use the Excel Worksheet Function Match to find an entry in a range. When attempting to execute, I get error code 1004. Unable to get the Match Property of the Worksheet function class. ndx = Application.WorksheetFunction.Match(aDate, "AMGN! Date") What is not available? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using WorksheetFunctions in Excel Macros
Hi Ken,
Match is expecting the second argument to be a range, but you are giving it a text string. Try something like: Sub A() Dim nIdx As Long Dim W As Worksheet Set W = ThisWorkbook.Worksheets(1) nIdx = Application.WorksheetFunction.Match("c", W.Range("Rng")) Debug.Print nIdx End Sub For the named range Rng. HTH Peter Beach "Ken" wrote in message ... I want to use the Excel Worksheet Function Match to find an entry in a range. When attempting to execute, I get error code 1004. Unable to get the Match Property of the Worksheet function class. ndx = Application.WorksheetFunction.Match(aDate, "AMGN! Date") What is not available? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 macros - how to merge 5 macros together into one | Excel Discussion (Misc queries) | |||
Training: More on how to use macros in Excel: Recording Macros | Excel Worksheet Functions | |||
excel.worksheetfunctions | Excel Worksheet Functions | |||
No VBA help for Worksheetfunctions available | Excel Worksheet Functions | |||
Making excel macros run Word macros | Excel Programming |