Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think that what you have will work if you...
Replace "application.match" With "application.worksheetfunction.match" Also, I would place the statement "On Error Goto Next" after the Dim statement. "Ben H" wrote: Hi all Can someone please explain why this isn't working? It is called from a different Sub marco with What_I_Want being a text string I need to match. It should return the value of hte column as well Function Look_Up_Accross(ByVal What_I_Want) Dim sStr As String, rng As Range Set rng = Range(Cells(1, 1), Cells(1, 256).End(xlToLeft)) res = Application.Match(What_I_Want, rng, 0) If Not IsError(res) Then MsgBox "column: " & res Else MsgBox "Not found" End If Look_Up_Accross = res End Function Thanks, Ben H. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code problem | Excel Discussion (Misc queries) | |||
CODE PROBLEM | Excel Discussion (Misc queries) | |||
XLS to CSV Code Problem | Excel Worksheet Functions | |||
code problem | Excel Programming | |||
Code Problem ! | Excel Programming |