Thread
:
#NA error using vlookup in vba
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
#NA error using vlookup in vba
Perhaps we need to tell excel what cobstore is?
Sub lookitup()
cobstore = 1
Range("I15") = Application.VLookup(cobstore, _
Worksheets("sheet4").Range("d2:e188"), 2)
End Sub
--
Don Guillett
SalesAid Software
"Noemi" wrote in message
...
Hi
I have the following formual in VBA and I keep getting the #NA in the
ouput
cell and I dont know why.
Dim stNumber As String
Dim stans As Variant
stNumber = cobStore.Value
stans = Application.VLookup(stNumber,
Worksheets("Numbers").Range("A2:B188"), 2)
Range("I15").Value = stans
can someone please help.
Thanks
Noemi
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]