Custom function to simplify Index(match)) formula
Hello,
Do you know how to custom this in the same way that Bob Phillips did:
=IF(ISERROR(INDEX(A1:C3,MATCH(D2,A1:A3,),MATCH(E1, A1:C1,))),"",INDEX(A1:C3,MATCH(D2,A1:A3,),MATCH(E1 ,A1:C1,)))
Thanks in advance
"Bob Phillips" wrote:
Public Function myLookup(lookup_value, _
table_array As Range, _
col_index_num As Long, _
Optional range_lookup As Boolean = True)
Dim tmp
On Error Resume Next
tmp = Application.VLookup(lookup_value, table_array, col_index_num,
range_lookup)
On Error GoTo 0
If IsError(tmp) Then
myLookup = ""
Else
myLookup = tmp
End If
End Function
|