Hello Ninjas,
Can someone please help me? TIA.
Say I have a workbook with a worksheet "Report". I have the following UDF which works fine when I have the "Report" worksheet on the same workbook. I would like to modify this UDF to lookup a worksheet ("Range") in another workbook on the server(say filesReport.csv) but do not know how to refer to that range, everything else being the same.
Public Function Name(datacell As Range)
Dim Column As Integer
Dim table As Range
Column = 2
Set table = Range("Report!a1:au1525")
Name = Application.WorksheetFunction.VLookup(datacell, table, Column, 0)
End Function
Can someone please help me? TIA.
Say I have a workbook with a worksheet "Report". I have the following UDF which works fine when I have the "Report" worksheet on the same workbook. I would like to modify this UDF to lookup a worksheet ("Range") in another workbook on the server(say filesReport.csv) but do not know how to refer to that range, everything else being the same.
Public Function Name(datacell As Range)
Dim Column As Integer
Dim table As Range
Column = 2
Set table = Range("Report!a1:au1525")
Name = Application.WorksheetFunction.VLookup(datacell, table, Column, 0)
End Function