How to calculate a question by adding conditions as well as error messages if conditions are not met

Good morning all
delighted to be part of the community
My issue is the following:
data
1.question A (Total number of beneficiaries)
2.question B already participated in this topic
3. question C 1st participation
4.question D number of men
5.question E number of women
6.question F number of host
7.question G number of refugees

I would like to integrate the following conditions:
= (IF (AND (SUM (question B: question C) = question A; SUM (question D: question E) = question A); IF (AND (SUM (question F: question G) = question A); "Not error “;” Error ")))

Need your help please

Welcome to the community, @CharlesBARA! Would you also mind sharing your requirement in a descriptive form so that the community could know what you intend to see?

Uploading: Calculation_test.xlsx… Calculation_test.xlsx (9.3 KB)
Here is my attached file I do not know how to go about integrating its conditions

I would just like these questions to have a logical sequence and a coherent one so as to display an error message if the conditions are not respected

Sorry @CharlesBARA, could you also describe your conditions? We are still unaware about the conditions that you require.

I would like to:
The sum of B + C (integer: Have already participated in this theme + 1st participation in this theme: either equal to A (integer: Total number of participants) and that the sum of D + E = A and that the sum of F + G equal to A
if this condition is not respected during data entry, the questionnaire must display a mandatory error message

Thank

Please could someone help me

cordially

You could do this as discussed in our previous post:

First approach:

Second approach:

Thank you very much

I try and I give you feedback

cordially

1 Like

Good evening the community
I almost got the coding done it works fine with the first 3 lines. <= $ {A}
= ($ {A} - $ {B})
<= $ {A}
but does not work for the following: <= ($ {A} - $ {D})
= ($ {A}
<= ($ {A} - $ {F})
By following the same logic

I would still like your help please

Thanks for your support

Calculation_test_V2.xlsx (13.8 KB) Uploading: Calculation_test_V2.xlsx…

@CharlesBARA, were you able to solve your issue?

2. Xlform- sensibilisations.xlsx (9.5 KB)

Its solve thank you

1 Like

@CharlesBARA, glad to know you were able to solve the issue!