Good day
I have a formula that I have written and I am getting null values that default to 50+. I have tried to write is null then statement but that is not working.
There are null values in the field.
Here is my formula
If [Opportunity_Employees_Paid_Per_Payroll__c]<=4 then '1-4'
Elseif [Opportunity_Employees_Paid_Per_Payroll__c]>=5 && [Opportunity_Employees_Paid_Per_Payroll__c]<=9 then '5-9'
Elseif [Opportunity_Employees_Paid_Per_Payroll__c]>=10 && [Opportunity_Employees_Paid_Per_Payroll__c]<=19 then '10-19'
Elseif [Opportunity_Employees_Paid_Per_Payroll__c]>=20 && [Opportunity_Employees_Paid_Per_Payroll__c]<=49 then '20-49'
Else '50+'
Endif
Solved! Go to Solution.
Your formula does not account for null values, so if a null value is encountered it will evaluate to your "else" condition of "50+". What do you want null values to evaluate as?
I would like the null value to be 0
0 is a number though, and all your values evaluate to a string. Still, you can just add a line right before the 50+ line that says if IsNull([field name]),'0'
But again, just know that it won't be the number 0, but rather the character 0.
Unless you mean that you want to treat a null for [Opportunity_Employees_Paid_Per_Payroll__c] as zero, and have your formula evaluate to 1-4. Then you can change your first line of code to:
If IsNull([Opportunity_Employees_Paid_Per_Payroll__c]) OR [Opportunity_Employees_Paid_Per_Payroll__c]<=4 then '1-4'
Awesome thank you for the advice and the help
Welcome!