Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I am trying to do a custom lookup function where the range remains constant
a1:b365 and I am trying to lookup a long list where some references are blank and do not want #NA throughout the document so I tried: Function Lookupdate(datehere) ' If datehere = 0 Then Lookupdate = "" Else If datehere < 0 Then {is < not equal to?} Lookupdate = Application.Lookup(datehere, Sheet2!Range(A1:b366)) End If End If End Function where datehere is a date on a calendar and I am trying to lookup that date in column a on sheet 2 and return column b (importance of date - holiday, birthday, appointment,etc)from sheet 2. lookup(e4,sheet2!a1:b366) works in excel but when trying to do this in a custom function with vba I cannot get it to work. I need someway to do this for a long list with out getting #N/A and also when I try to autofill the lookup function in excel it changes the range also. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Repeatable crash in Custom Error Bar range selection | Excel Discussion (Misc queries) | |||
Custom Text Box In A Form For Selecting A Range! | Excel Discussion (Misc queries) | |||
Defining a custom-named Range across several worksheets | Excel Worksheet Functions | |||
Custom or VBA Function for Avg, Std, Min, Max | Excel Discussion (Misc queries) | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions |