How can I sum numerical variables even if some are missing?

I want to sum across variable a1 a2 a3 a4 a5. But the respondent does not need to enable all variables and may leave some black. But I want to ensure the sum is not more than 100.



which will ignore the NULL values in the questions a1, a2 etc.

Why should enumerators may leave some questions blank/unanswered? Consider to use additional filter questions based on which specific questions a3, a4 etc. will not be enabled.