# If Statement Problem

**URL:** <https://forum.getodk.org/t/if-statement-problem/33039>\
**Category:** Support\
**Tags:** form-design, odk-aggregate, odk-xlsform, odk-collect\
**Created:** [April 1, 2021, 8:50am UTC](https://forum.getodk.org/t/if-statement-problem/33039 "2021-04-01T08:50:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rumana\_Dilshad](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/rumana_dilshad/32/10757_2.png) [@Rumana\_Dilshad](https://forum.getodk.org/u/Rumana_Dilshad)\
**Post date:** [April 1, 2021, 8:50am UTC](https://forum.getodk.org/t/if-statement-problem/33039/1 "2021-04-01T08:50:18Z")

</div>

Dear Friends,

I need help with a conditional statement. Under which column and how do I  
write an if statement in xls form.

For example, if i have a multiple answer question 'A' and after that an integer field "B', then if we select any from the multiple answers 'A' then we cannot skip 'B' (as these fields are not mandatory). How can I put condition to integer field 'B'? At which column I can write if statement? in odk xlsform??

Thanks,  
Rumana

---

<div class="post-metadata">

**Author:** ![Grzesiek2010](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/grzesiek2010/32/2881_2.png) [@Grzesiek2010](https://forum.getodk.org/u/Grzesiek2010)\
**Post date:** [April 1, 2021, 10:04am UTC](https://forum.getodk.org/t/if-statement-problem/33039/2 "2021-04-01T10:04:09Z")

</div>

Hi @Rumana_Dilshad  
We're glad you're here. When you get a chance, please [introduce yourself on this forum thread](https://forum.getodk.org/t/-/6671).

If I understand your case you don't need any if statement. You should use relevant and required columns like:  
[relevantAndconstraintTest.xlsx](https://forum.getodk.org/uploads/short-url/iRRKOs2FP9vuiynS85z0afr5NTa.xlsx) (8.1 KB)

---

<div class="post-metadata">

**Author:** ![Rumana\_Dilshad](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/rumana_dilshad/32/10757_2.png) [@Rumana\_Dilshad](https://forum.getodk.org/u/Rumana_Dilshad)\
**Post date:** [April 1, 2021, 12:57pm UTC](https://forum.getodk.org/t/if-statement-problem/33039/3 "2021-04-01T12:57:28Z")

</div>

Thank you again. I will introduce myself later

---

<div class="post-metadata">

**Author:** ![LN](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ln/32/1605_2.png) [@LN](https://forum.getodk.org/u/LN)\
**Post date:** [March 29, 2022, 9:37pm UTC](https://forum.getodk.org/t/if-statement-problem/33039/4 "2022-03-29T21:37:46Z")

</div>

A post was split to a new topic: [Show different value based on total score](https://forum.getodk.org/t/show-different-value-based-on-total-score/37177)

---

<div class="post-metadata">

**Author:** ![LN](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ln/32/1605_2.png) [@LN](https://forum.getodk.org/u/LN)\
**Post date:** [March 29, 2022, 9:37pm UTC](https://forum.getodk.org/t/if-statement-problem/33039/5 "2022-03-29T21:37:54Z")

</div>


