With your validation tip you might get this
You obviously don't want to display this.
Better to use a nested IF.
Start slowly:
The syntax of the IF-statement is
if(condition, true part, false part)
And of course you can nest this, like
if(condition1, true part 1,
if(condition2, true part 2, false part 2))
So the blue part is handled if the first condition is FALSE.
And you can do this many times.
Now the validation equation:
Here you enter which conditions have to be TRUE
And in the validation tip you usually display something if the condition is FALSE.
In your validation equation you have AND operators.
A and B and C and D and E and F (with F as the "sum" condition.
A, B, C, D, E, F have to be TRUE that the entire validation is TRUE
When will this equation be FALSE?
Either you say
NOT(A and B and C and D and E and F)
or you use this simple transformation
NOT A or NOT B or NOT C or NOT D or NOT E or NOT F
as we learned at school.
Now you can write your tip like (remember: the exclamation mark is the NOT operator)
{if(
!A or !B or !C or !D or !E,"Only numbers 0-100",
if(!F,"Sum must be 100",""))}
Replace A,B,C,.. by the conditions and it's fine. Don't forget the .NAOK!
By the way: It is not easy to validate this. You expect a certain value, but the cell is empty at the beginning, and the sum is not equal 100 at the beginning. So there is always an initial error.
I found that it might be better to take into account the checkboxes, like
(Q1_S1!="Y" or Q1_S1comment.NAOK ge 0) and (Q1_S2!="Y" or Q1_S2comment.NAOK ge 0) and (Q1_S3!="Y" or Q1_S3comment.NAOK ge 0) and (Q1_S4!="Y" or Q1_S4comment.NAOK ge 0) and (Q1_S5!="Y" or Q1_S5comment.NAOK ge 0) and sum(self.sq_comment.NAOK)==100
Joffm