I have five labels and each is assigned a variable (vLabel1, vLabel2, vLabel3, vLabel4, and vLabel5) so that OnSelect, it toggles between true and false. I have it set so that the label is blue when the variable is false and red when it is true. All I need to do is to calculate the number of red labels versus the number of blue. I am just finding it hard to create an equation to count the number of labels that are true versus the number that are false. I need to be able to say Red = 2, Blue = 3, for example.
One way to do this is to add your variables to a table. In the example below, the Table function creates a table with 5 rows. The column name is 'Variable' and each row in the table corresponds to a vLabelX variable.
You can then call the CountIf function and specify a condition to return a row count.
The formula to return a count of red labels would look like this: