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
Jeff BomarJeff Bomar 

Problem with field formula

Hello everyone I have a problem with a field formula field named Space_Cost.

Formula

(Space_Count__c - 1) *  Additional_Space_Rate__c

the problem is if the field is Null or empty I get a negative number 
For example, if the space count is null or 0 or 1 I want the field to equal 0.00 if the field equals anything else do the formula above since the first space is free. 

any help would be much appreciated.
Best Answer chosen by Jeff Bomar
Maharajan CMaharajan C
Hi Jeff,

Please try the below formula:
 
if( AND ( NOT(ISBLANK(Space_Count__c)), Space_Count__c <> 0 , Space_Count__c <> 1 ) , (Space_Count__c - 1) *  Additional_Space_Rate__c , 0.00 )

Thanks,
Maharajan.C

All Answers

Maharajan CMaharajan C
Hi Jeff,

Please try the below formula:
 
if( AND ( NOT(ISBLANK(Space_Count__c)), Space_Count__c <> 0 , Space_Count__c <> 1 ) , (Space_Count__c - 1) *  Additional_Space_Rate__c , 0.00 )

Thanks,
Maharajan.C
This was selected as the best answer
Jeff BomarJeff Bomar
That worked thanks so much