![]() |
VLookup error message while accessing range in closed workbook.
Hi
I am trying to access a Range in another (unopened) workbook by creating a temporary range called "test" that I will later delete to remove the Link. That is ok but I want to get the Price asociated with "Angus" but get an error "Unable to get the VLookup property of the Worksheet Function class" The Vlookup function works if typed into the worksheet. I would appreciate some helpful suggestions Peter Code follows: ActiveWorkbook.Names.Add Name:="test", RefersTo:="='G:\[Price List.xls]Price List'!$A$2:$B$53" xxx = Application.WorksheetFunction.VLookup("Angus", test, 2, False) |
VLookup error message while accessing range in closed workbook.
Peter
Try xxx = Application.WorksheetFunction.VLookup("Angus", Range ("test"), 2, False) Tony -----Original Message----- Hi I am trying to access a Range in another (unopened) workbook by creating a temporary range called "test" that I will later delete to remove the Link. That is ok but I want to get the Price asociated with "Angus" but get an error "Unable to get the VLookup property of the Worksheet Function class" The Vlookup function works if typed into the worksheet. I would appreciate some helpful suggestions Peter Code follows: ActiveWorkbook.Names.Add Name:="test", RefersTo:="='G:\[Price List.xls]Price List'!$A$2:$B$53" xxx = Application.WorksheetFunction.VLookup("Angus", test, 2, False) . |
All times are GMT +1. The time now is 08:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com