Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Excel VBA Question
I am trying to create a Vlookup function with an additional argument to
return if the vlookup function evaluates to #N/A (Below is the code). It works fine unless the function evaluates to #N/A. I would greatly appreciate any help, Michael Function VLOOKUP_NA(VAL1, Range, OFFSET, TF, NAVALUE) If WorksheetFunction.IsNA(WorksheetFunction.VLookup(V AL1, Range, OFFSET, TF)) < False Then VLOOKUP_NA = NAVALUE ElseIf WorksheetFunction.IsNA(WorksheetFunction.VLookup(V AL1, Range, OFFSET, TF)) = False Then VLOOKUP_NA = WorksheetFunction.VLookup(VAL1, Range, OFFSET, TF) End If End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Simple Excel Question | Excel Discussion (Misc queries) | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple Excel Question? | Excel Programming | |||
very simple VBA question for Excel | Excel Programming | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) |