View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rebecca_SUNY Rebecca_SUNY is offline
external usenet poster
 
Posts: 14
Default Custom Worksheet Function - Absolute...?

I have created the following worksheet function. 1) I would like to make the
"Table_Array" an absolute addressing as the default, regardless of what is
typed in and 2) if possible, allow it to be editted to relative addressing if
desired.

Public Function iiVlookup(Lookup_Value, Table_Array As Range, _
Col_Index_Num As Integer, Optional Range_Lookup As Boolean = False, Optional
IsErrorValue = "")

' Uses the vlookup function but returns a user defined value (IsErrorValue)
if the vlookup results in an error message.

iiVlookup = Application.VLookup(Lookup_Value, Table_Array, Col_Index_Num,
Range_Lookup)


If IsError(IfIserrorVlookup) Then

iiVlookup = IsErrorValue

Else

iiVlookup = iiVlookup

End If

End Function