vlookup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
Is it possible that cobStore.Value is less than the value in A2 (of the
range)?

Try dropping stans into a spare cell to ensure the 'lookup' is valid.

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

#NA error using vlookup in vba 3
Excel VBA vlookup 1
vlookup text in vba 3
Array Formula 11
vlookup 1
Excel VBA - counting cells by colors and names to it in two different rows. 0
Vlookup Problem 7
what if analysis 3

Back
Top