 |
| View previous topic :: View next topic |
| Author |
Message |
bremen Newbie
Joined: 16 Jun 2005 Posts: 2
|
Posted: Jun 30th, 2005 09:36 AM Post subject: Worksheet function, vlookup not working, can anymore help? |
|
|
I'm working on a loop with will excecte the vlookup from worksheet function.
If I hard code the criteria, the function works fine, but when I changed the criteria into a varible, then an error msg comes up say can't find the vlookup property from worksheet.function.
' works fine with "A10" as critiera
nana = Application.WorksheetFunction.VLookup("A10", _
Sheet12.Columns("B"), 1, False)
' error msg when i replaced "A10" with aRange
aRange = Sheet4.Range("A" & k)
nana = Application.WorksheetFunction.VLookup(aRange, _
Sheet12.Columns("B"), 1, False)
I'm wondering if it's to do with the return type?
I'm not sure what the problem is and really hope you guys can give me a hand here.
Thank you!! |
|
| Back to top |
|
more Newbie
Joined: 07 Jun 2005 Posts: 13
|
Posted: Jul 4th, 2005 02:56 AM Post subject: You forgot just a little bitsy something |
|
|
you forgot to use the ampersand "&" with your string.
you should do like this: an example
nana=blabla.blabla("A10" & _
blabla,(false))
the ampersand "&" connects the string when you use the underscore. |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|