Thread: Vllokup
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Vllokup

oops - should be Range("Table") in VBA.
regards
Paul

wrote:
Hi
Try
Cells(2, 9) = WorksheetFunction.VLookup(Cells(2, 7), "Table", 2, FALSE)

The range name must be in quotes.
regards
Paul

T De Villiers wrote:
Table is a name I have defined,
the following is my vlookup with which I get object-defined error,

many Thanks

Sub test()

Cells(2, 9) = WorksheetFunction.VLookup(Cells(2, 7), Table, 2, 0)


End Sub


--
T De Villiers
------------------------------------------------------------------------
T De Villiers's Profile: http://www.excelforum.com/member.php...o&userid=26479
View this thread: http://www.excelforum.com/showthread...hreadid=566961