pdvsa
asked on
Switch error
Experts, I have a wrong number of arguments in this SWitch statement:
PastDueOrPendingSWITCH: Switch([Due Date Per Docs]<Date() & Isnull([Completed]),"Past Due", IsNull([Completed] and [Due Date Per Docs]<Date(),"Pending", IsNotNull([Completed]),"Co mpleted",1 =1,"Other" )
Not sure if "IsNotNull" is the issue. I also tried Nz([Completed]),"")="". I imagine it is a comma or a parenth but I dont see it.
thank you
PastDueOrPendingSWITCH: Switch([Due Date Per Docs]<Date() & Isnull([Completed]),"Past Due", IsNull([Completed] and [Due Date Per Docs]<Date(),"Pending", IsNotNull([Completed]),"Co
Not sure if "IsNotNull" is the issue. I also tried Nz([Completed]),"")="". I imagine it is a comma or a parenth but I dont see it.
thank you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you Gustav. Thanks for pointing out that the first 2 tests were identical.
Fyed: seems there was a wrong number of arguments
Fyed: seems there was a wrong number of arguments
You are welcome!
/gustav
/gustav
I was missing a ), but also didn't pick up on the fact that the first two were identical until after Gustav mentioned that.
PastDueOrPendingSWITCH: Switch(
[Due Date Per Docs]<Date() AND Isnull([Completed]),"Past Due",
IsNull([Completed] AND [Due Date Per Docs]<Date(),"Pending", IsNotNull([Completed]),"Co
1=1,"Other")