You need to sign in to do that
Don't have an account?
IF Formula help with blank date
I'm just started as Admin for an org that has a lot of complicated formulas implemented -- I want to generally overhaul them but in the meantime I have to work with what I've got...
There's an existing formula I need to tweak to have an additional results, and I'm having trouble figuring out what to do.... HELP!
Here is the existing formula:
IF( Subscription_Purchases__c > 0 && Expiration_Date__c < TODAY(), "Expired",
IF( Subscription_Purchases__c > 0, "Purchased" ,
IF( Report_Pack_Purchases__c > 0, "Purchased", null)
))
I want to change the first IF statement to accomodate Cancelled accounts. it should be something like:
If field Subscription_Purchases__c greater than 0, AND Expiration_Date__c greater than TODAY(), AND field "CancellationDateAccount__c" is blank --- return value of "Expired",
(I know this is wrong way to write formula, just writing it out theoretically. Expiration_Date and CancellationDateAccount are both date fields).
And then I want to also add an additional IF Statement to return "Cancelled" for those accounts I want to mark as such.
Essentially the ones that fall into this criteria:
If field "CancellationDateAccount__c" less than than or equal to Expiration_Date__c --- return value of "Cancelled",
Thanks in advance for anyone's help!
IF(Subscription_Purchases__c > 0 && Expiration_Date__c < TODAY() && ISBLANK(CancellationDateAccount__c), "Expired",
IF(Subscription_Purchases__c > 0, "Purchased" ,
IF( Report_Pack_Purchases__c > 0, "Purchased",
IF(CancellationDateAccount__c <= Expiration_Date__c, "Cancelled",
null))))
All Answers
Hi there, Hope this helps!
Prady
Thanks for response -- tried that and got this error;
Error: Incorrect parameter type for function 'and()'. Expected Boolean, received Number
looks like it is in relation to the top first expression...
IF(Subscription_Purchases__c > 0 && Expiration_Date__c < TODAY() && ISBLANK(CancellationDateAccount__c), "Expired",
IF(Subscription_Purchases__c > 0, "Purchased" ,
IF( Report_Pack_Purchases__c > 0, "Purchased",
IF(CancellationDateAccount__c <= Expiration_Date__c, "Cancelled",
null))))
Give this a try! thanks.
Prady
Thanks everyone - working now!