In this case, you could do this as outlined in the image shared below:
In the survey tab of your xlsform:
Data entry screen as seen in Enketo:
Reference xlsform:
Constraint Example.xlsx (10.7 KB)
In this case, you could do this as outlined in the image shared below:
Constraint Example.xlsx (10.7 KB)