AkaTrouble
Well-known Member
- Joined
- Dec 17, 2014
- Messages
- 1,544
hiya peeps
as per the title i am after a UDF Function for lookups (maybe at first glance is re-inventing the wheel)
examples of how i see the function syntax in cell
=NewLook(LookUpWhat,NamedRange,OffsetColumnToReturn)
=NewLook(LookUpWhat,TableName,OffsetColumnToReturn)
=NewLook(LookUpWhat,SheetNameUsedRange,OffsetColumnToReturn)
=NewLook(LookUpWhat,EnteredRange,OffsetColumnToReturn)
LookUpWhat can equal cell reference, text string, number, date
if the lookup range does not have OffsetColumnToReturn the return text string "##err##"
if LookUpWhat does not exist in Search range return text string "#not found#"
if has no entry return "" null string not error, and if has error in source but OffsetColumnToReturn exists return "" null string
it is envisaged that the lookup range will not have duplicates (unless you have any ideas how to deal with such)
the lookup ranges may be on hidden sheets
it is also possible that the needed return value will be in a preceding column to the LookUpWhat (which highlights a possible need for 4th syntax needed which column of search range to LookUpWhat)
i understand there is many variables here and it may not be possible to have one UDF to cover all, but thought best to start explaining what i would like at beginning rather than adding requirements as solutions offered. If each type of search range needs own UDF then i can understand that limitation.
hopefully i have made some sense of a difficult conundrum without trying to answer my own question and thanks for reading
as per the title i am after a UDF Function for lookups (maybe at first glance is re-inventing the wheel)
examples of how i see the function syntax in cell
=NewLook(LookUpWhat,NamedRange,OffsetColumnToReturn)
=NewLook(LookUpWhat,TableName,OffsetColumnToReturn)
=NewLook(LookUpWhat,SheetNameUsedRange,OffsetColumnToReturn)
=NewLook(LookUpWhat,EnteredRange,OffsetColumnToReturn)
LookUpWhat can equal cell reference, text string, number, date
if the lookup range does not have OffsetColumnToReturn the return text string "##err##"
if LookUpWhat does not exist in Search range return text string "#not found#"
if has no entry return "" null string not error, and if has error in source but OffsetColumnToReturn exists return "" null string
it is envisaged that the lookup range will not have duplicates (unless you have any ideas how to deal with such)
the lookup ranges may be on hidden sheets
it is also possible that the needed return value will be in a preceding column to the LookUpWhat (which highlights a possible need for 4th syntax needed which column of search range to LookUpWhat)
i understand there is many variables here and it may not be possible to have one UDF to cover all, but thought best to start explaining what i would like at beginning rather than adding requirements as solutions offered. If each type of search range needs own UDF then i can understand that limitation.
hopefully i have made some sense of a difficult conundrum without trying to answer my own question and thanks for reading