I'm trying to create a function that will vlookup some data on a spreadsheet on a network drive (the O:/ drive) but when I put in the code that I have below and try to use it I get a #VALUE error. What am I missing?
![]()
Public Function aPackaging(PartCell As Range) As String Dim rng As Range rng = "'O:\Common\Common-Parts\Prcng\SpecialCosts\XL\[PackagingCodes.xlsx]PRICE_ALLALL'!$A$2:$G$1000000" aPackaging = Application.VLookup(PartCell, rng, 3, False) End Function
Bookmarks