View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default using lookup function in vba

Try changing this line:

Start = Application.WorksheetFunction.Lookup(name, "Q800:Q881", "t800:t881")

To this:

Start = Application.WorksheetFunction.Lookup(name, _
Range("Q800:Q881"), Range("t800:t881"))





"bigjim" wrote in message
...
I am trying to use the lookup function in my vba code. I'm using excel
2003.
Here is what I have so far, but it isn't working. I'm getting the error
"unable to get the lookup property of the worksheet function class"

Dim name As String
name = Range("e800")
Dim Start As Integer
Start = Application.WorksheetFunction.Lookup(name, "Q800:Q881",
"t800:t881")


This last line is what is highlighted

I'm kind of new to this stuff, so I realize this may sound simple, but I'm
having trouble getting it to work and any help would be appreciated.

Jim