function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Julia BJulia B 

Formula question on blank fields returning the text

Hi, I am trying to return on formula text type field, the outcome if 3 fields are empty to return text inactive if they are not empty and filled in return text active.

Can this be achieved? below is what I have so far :
IF(ISBLANK(Account_Name__c)&& ISBLANK(Name) && ISBLANK( CtM_Close_Date__c ) ,"Inactive","Active")
Best Answer chosen by Julia B
TechingCrewMattTechingCrewMatt
Hello, Julia. Based on the qay you stated the requirements, it seems like you want an OR() statement inside the IF() statement as follows:
IF(
   NOT(
      OR(
         ISBLANK(Account_Name__c), 
         ISBLANK(Name),
         ISBLANK(CtM_Close_Date__c)
      ) 
   ),
   "Active",
   "Inactive"
)

If any of the fields have a value, the formula evaluates to "Active". Otherwise, they are all blank and the formula evaluates to "Inactive".

Thanks,
Matt

All Answers

TechingCrewMattTechingCrewMatt
Hello, Julia. Based on the qay you stated the requirements, it seems like you want an OR() statement inside the IF() statement as follows:
IF(
   NOT(
      OR(
         ISBLANK(Account_Name__c), 
         ISBLANK(Name),
         ISBLANK(CtM_Close_Date__c)
      ) 
   ),
   "Active",
   "Inactive"
)

If any of the fields have a value, the formula evaluates to "Active". Otherwise, they are all blank and the formula evaluates to "Inactive".

Thanks,
Matt
This was selected as the best answer
VinayVinay (Salesforce Developers) 
Hi Julia,

Try below and let me know if that works.
 
IF(ISBLANK(Account_Name__c)|| ISBLANK(Name) || ISBLANK(CtM_Close_Date__c ) ,"Inactive","Active")

Thanks,
Vinay Kumar
TechingCrewMattTechingCrewMatt
@Vinay Her requirements state that if all three fields are blank then it should return "Inactive". That implies that if any are populated, it should return "Active".
Sherry NorvellSherry Norvell
Have you found an answer to your query?
I'm having the same issue.
Can use NA(), which return an error so that when charting, excel will ignore. However, won't work in pivot tables or charts.
Have you had any joy since you posted this ( I notice some time ago)
Julia BJulia B
Hello and thank you all for your help, the TechingCrewMatt answer worked for me.