Hello, I am attempting to write a formula in which the following conditions are true:
I have 5 checkboxes with assigned/linked cells ($M$1, $N$1, $O$1, $P$1, and $Q$1).
If none of the checkboxes are checked, the result needs to be 40.
If ANY one of the five checkboxes is checked, the result needs to be 32.
If ANY two of the 5 checkboxes are checked, the result is 24.
If ANY three of the 5 checkboxes are checked, the result is 16.
And if ANY four of the 5 checkboxes are checked, the result is 8.
If all checkboxes are checked the result is 0.
I have this formula so far, however it doesn't do everything correctly:
=IF(Q1=TRUE,0,IF(P1=TRUE,8,IF(O1=TRUE,16,IF(N1=TRUE,24,IF(M1=TRUE,32,40)))))

Any ideas on how to make this work?