Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to turn this formula into a VBA function (this formula works
fine, but I have some other IF's I need to add that will take it over the limit of 7): =IF(R44="nc","",IF(R44="jcn","",IF(R44="wce","",IF (R44="cnd","",IF(R44="no spare",(LOOKUP(Q44,WUC!A:A,WUC!D:D)),IF(R44="spare ",(LOOKUP(Q44,WUC!A:A,WUC!D:D)))))))) So far I have this: Function Narrative(Reason As Range, Alias As Range) If Reason = "nc" Then Narrative = "" ElseIf Reason = "jcn" Then Narrative = "" ElseIf Reason = "wce" Then Narrative = "" ElseIf Reason = "cnd" Then Narrative = "" ElseIf Reason = "rfs" Then Narrative = "" Else After the else I want the Lookup part of the formula - (LOOKUP(Q44,WUC!A:A,WUC!D:D), but I can't get it to work. The alias as defined above is what I want the Lookup formula to look up in the other sheet. Any suggestions will be greatly appreciated, I'm very new to VBA code. Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
LOOKUP FUNCTION? (LOOKUP VALUE BEING A TIME RENERATED FROM A FORMU | Excel Discussion (Misc queries) | |||
Can I create a multiple LOOKUP formula with 'then' function??? | Excel Worksheet Functions | |||
Whats better Lookup or Function Formula | Excel Worksheet Functions | |||
I need to use a lookup function in an if formula. | Excel Discussion (Misc queries) | |||
Array Formula Using LOOKUP function. | Excel Worksheet Functions |