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
Nate GriebNate Grieb 

ISBLANK in formula not working when ISBLANK is true

I'm trying to create a formula field that first checks to see if there IS a value for another field. If there is NOT a value there, do nothing. If there IS a value there subtract that value from an additional field. Here is the formula:

IF(
ISBLANK(Org_Member_Old_Value__c ),
NULL,
IF(NOT(ISBLANK(Org_Member_Old_Value__c)),
Org_Members__c -  Org_Member_Old_Value__c,
NULL
))

It is not working though, it is returning the value of (Org_Members__c - Org_Member_Old_Value__c) everytime regardless. 

Some additional information.
- Both of the other fields Org_Members__c  and Org_Member_Old_Value__c are number fields.
- The Org_Member_Old_Value__c is populated through a process that stores the previous value of the Org_Members__c field every time it is updated. 

Thanks!
Best Answer chosen by Nate Grieb
Scott Shapiro 27Scott Shapiro 27
Why not just do:

IF(
ISBLANK(Org_Member_Old_Value__c ),
NULL,
Org_Members__c -  Org_Member_Old_Value__c
)

Also, if that doesn't work, maybe change ISBLANK to ISNULL depending on how the field was setup to treat blanks (as zeroes or null).

All Answers

Scott Shapiro 27Scott Shapiro 27
Why not just do:

IF(
ISBLANK(Org_Member_Old_Value__c ),
NULL,
Org_Members__c -  Org_Member_Old_Value__c
)

Also, if that doesn't work, maybe change ISBLANK to ISNULL depending on how the field was setup to treat blanks (as zeroes or null).
This was selected as the best answer
Nate GriebNate Grieb
Thanks Scott, 

That is simpler, thanks for that. It worked once I updated it to "ISNULL" instead of "ISBLANK" thanks for your help. 
Nate GriebNate Grieb
I also needed to update the formula field to treat blank fields as blanks (not zeros). That may have been the underlying issue. 
Scott Shapiro 27Scott Shapiro 27
Glad to hear!