Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Vlookup with tableLookup is external workbook

Hello, i try use in VBA the Worksheetfuncion Vlookup with table lookup
another workbook.

Sub test()
Dim Look As Range
Dim tLook As Range

Set Look = Cells(2, 2)

---------------Error in next line ("P" is a name range)-----------------
Set tLook = Workbooks("c:\temp\test.xls").Sheets("test").Range ("P")

ActiveCell = Application.WorksheetFunction.VLookup(Look, tLook, 10, 0)

End Sub

Any help is appreciate

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Vlookup with tableLookup is external workbook

Assuming the workbook is open, you only need:

Set tLook = Workbooks("test.xls").Sheets("test").Range("P")

--

Vasant



"Carlos" wrote in message
...
Hello, i try use in VBA the Worksheetfuncion Vlookup with table lookup
another workbook.

Sub test()
Dim Look As Range
Dim tLook As Range

Set Look = Cells(2, 2)

---------------Error in next line ("P" is a name

range)-----------------
Set tLook = Workbooks("c:\temp\test.xls").Sheets("test").Range ("P")

ActiveCell = Application.WorksheetFunction.VLookup(Look, tLook, 10, 0)

End Sub

Any help is appreciate

Thanks




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Vlookup with tableLookup is external workbook

Thanks Vasant, but probably the workbook most of the time is close.
It possible to point to external reference or i have to open the Book and
keep hidden

I thanks to the fast support

"Vasant Nanavati" <vasantn *AT* aol *DOT* com wrote in message
...
Assuming the workbook is open, you only need:

Set tLook = Workbooks("test.xls").Sheets("test").Range("P")

--

Vasant



"Carlos" wrote in message
...
Hello, i try use in VBA the Worksheetfuncion Vlookup with table lookup
another workbook.

Sub test()
Dim Look As Range
Dim tLook As Range

Set Look = Cells(2, 2)

---------------Error in next line ("P" is a name

range)-----------------
Set tLook = Workbooks("c:\temp\test.xls").Sheets("test").Range ("P")

ActiveCell = Application.WorksheetFunction.VLookup(Look, tLook, 10,

0)

End Sub

Any help is appreciate

Thanks






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup to an external file Lee Crew Excel Discussion (Misc queries) 8 September 21st 09 04:01 PM
vlookup not updating from external workbook Frustrated Wildcat Excel Worksheet Functions 1 February 4th 09 02:32 PM
Vlookup in external file Tami Excel Worksheet Functions 2 October 8th 08 09:55 PM
Vlookup referring to External Workbook or Spreadsheet cgsteel Excel Worksheet Functions 1 March 13th 08 10:36 PM
VLookup to an external Workbook don New Users to Excel 3 November 17th 05 05:31 PM


All times are GMT +1. The time now is 07:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"