[SalesForce] Validation Rule: Only one of three fields can be filled in

I am trying to create a validation rule that is triggered when more than one of the three fields is filled in.
So far I have created one which doesn't run as long as at least one field is filled in… but I want to restrict this to only one field.

AND(
 ISBLANK(Field1__c), 
 ISBLANK(Field2__c),
 ISBLANK(Field3__c)
)

How can I rewrite this validation rule to say either none or one of those fields can be filled in.

Best Answer

Use the following formula:

(
 IF(ISBLANK(Field1__c),1,0)
 + IF(ISBLANK(Field2__c),1,0)
 + IF(ISBLANK(Field3__c),1,0)
) < 2
Related Topic