Using checkboxes, can I write formulas based on what is checked?

  • Thread starter Thread starter Liz
  • Start date Start date
L

Liz

If I use checkboxes for different types of defects, can I then create a
formula to add up what is checked?

Thanks,
Liz
 
You could use code that would inspect the checkboxes, but maybe you could just
use a linked cell for each checkbox.

If you do it nicely and put the linked cells in the same column, you could use:

=countif(a1:A10,true)

If you wanted to use code, you'd want to share where those checkboxes are--on a
userform or a worksheet. And if they're on a worksheet, are they from the Forms
toolbar or from the Control Toolbox toolbar?
 
Hi Liz

If you mean a checkbox object then the answer is no. However, the font
Windings2 gives the following symbols; Capital O gives a Tick and capital P
gives an X, there are other symbols you could use.

you might be able to use a SUMIF function, say you symbols in D2:d10 and you
want to count how many crosses (x's) Type Countif(D2:D10,"O"). This gives the
count of how many P in the range. Note it is a "O" the font just displays a
fancy X.

If you wanted to add numbers in column C that have a O in column D use
SUMIF(=SUMIF(D2:D10,"O",C2:C10)


Hope that this helps
Peter
 
Back
Top