I'm trying compare 2 values and then note if the values match or not via a formula.

This is the formula that is working as expected -

 Nation__c = Planning_Authority_Nation__c,"Countries Match","Countries Don't Match"

I want to update this so it only shows a value if the field Nation__c and Planing_Authority_Nation__c are both populated. I was thinking of doing a IF NOT ISBLANK formula, but it's not working. Is there another better way to accomplish this?

ISBLANK(Nation__c = Planning_Authority_Nation__c,"Countries Match","Countries Don't Match")))

In your formula, you've basically said that if the result of the equals check is not blank (which it never will be), to go through an alternative branch.

Instead, you'd need to check each field individually:

  NOT(OR(ISBLANK(Nation__c), ISBLANK(Planning_Authority_Nation__c))),
      Nation__c = Planning_Authority_Nation__c, 
      "Countries Match", 
      "Countries Do Not Match"

Also, note the use of de Morgan's Laws of Boolean operations. Basically, instead of writing AND(NOT(A), NOT(B)), we invert this to a simpler NOT(OR(A, B)).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.