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
vickySFDCvickySFDC 

How to count seleted check box value count using formula salesforce?

Hi All,

  I have 8 checkbox field in my object pagelayout.I want to count selected checkbox value and display in column.How to implement this requirement using formula function in salesforce?Please do the needful help.

Thanks,
Vicky
 
Mahesh DMahesh D
Hi Vicky,

Please use the below formula field:
 
IF(CB_1__c, 1, 0) + IF(CB_2__c, 1, 0) + IF(CB_3__c, 1, 0)

Here replace CB_1__c with your first check box and like that you replace all.

Create a formula field with decimal 0.

Please do let me know if it helps you.

Regards,
Mahesh
Vijay NagarathinamVijay Nagarathinam
Hi,

Use the below formual field, The formual field return type should be Number data type.
 
IF(Checkbox_Field1__c = TRUE, 1, 0) + 
IF(Checkbox_Field2__c = TRUE, 1, 0) + 
IF(Checkbox_Field3__c = TRUE, 1, 0) + 
IF(Checkbox_Field4__c = TRUE, 1, 0)

Let me know if you need any help regarding this.

Thanks,
Vijay