ARLookup is a function built in that workbook provided by Hoyasaxa215- you need to copy the module or VBA out of it - You get a Name error because that function does not exist in your other workbook
Public Function ARLOOKUP(SearchRange As Range, SearchVertical As String, SearchHorizontal As String) As Variant
' This function is create on 02-23-2008 ( February 23, 2008 )
' Source : Erik Winters, www.excelguide.eu
' © all rights reserved
' The use of this function is free on the next conditions :
' - the source keeps stated;
' - the code is not used to generate commercial profits;
' For an explanation of this function you might visit www.excelguide.eu
Dim SearchColumn As Variant
Dim SearchRow As Variant
Dim ColumnCount As Long
Dim RowCount As Long
Dim FindColumn As Long
Dim FindRow As Long
Dim HitsCount As Long
ColumnCount = 0
RowCount = 0
HitsCount = 0
For Each SearchColumn In SearchRange.Columns
ColumnCount = ColumnCount + 1
If VBA.UCase(SearchColumn.Columns.Cells(1, 1).Value) = VBA.UCase(SearchHorizontal) Then
FindColumn = ColumnCount
End If
Next SearchColumn
For Each SearchRow In SearchRange.Rows
RowCount = RowCount + 1
If VBA.UCase(SearchRow.Rows.Cells(1, 1).Value) = VBA.UCase(SearchVertical) Then
FindRow = RowCount
If FindColumn = 0 Or FindRow = 0 Then
ARLOOKUP = 0
Else
HitsCount = HitsCount + 1
If HitsCount = 1 Then
ARLOOKUP = SearchRange.Cells(FindRow, FindColumn).Value
Else
ARLOOKUP = ARLOOKUP & ", " & SearchRange.Cells(FindRow, FindColumn).Value
End If
End If
End If
Next SearchRow
End Function
Bookmarks