# Cumulative percentage equal to 100%

Hi Kal,

As paste above, the topic on cumulative percentage, how do I modify the coding so that instead of setting up a constraint of summation less than 100%, we want to capture the summation of the select multiple choices to be exatcly 100%? So if we input a sum of less or more than 100%, error message pops out saying “The total percentage must be 100%”

Welcome to the community, @saadiah_ghazali! Could you explain your requirement maybe with some dummy example so that we could better understand your requirement?

Hola @saadiah_ghazali te comparto un ejemplo de lo que tal vez estas preguntando, te puede ser de utilidad ya que eso fue lo que implemente para poder lograr solucionar lo del tema anterior, no se si sea lo que buscas hacer.

Saludos,

ejemplo_porcentajes.xlsx (12.8 KB)

1 Like

See attached xls with a dummy example test percentage.xlsx (13.3 KB) . For now the coding as guided before is limiting the response to have total percentage less than or equal to 100%. How can I add one more constraint limiting that total percentage must be 100%. As in picture 1, the last value displays an error as the total percentage exceed 100%. In addition to this, I want an error message also display if the total percentage is less that 100%. See picture 2.

.

Hi Luis,

Thanks for sharing! This coding surely works well. Just difference in my case is that we are allowing the respondents to choose how many options they want to have. We do not restrict the number of choices nor we ask them to rank the choices. Could try and work from your suggestion though. Thanks again!

@saadiah_ghazali, I have added 2 lines where the first line sums up the total and the second line flags the same if the sum does not reach 100%.

So now, this is what you see while collecting data.

#### Reference xlsform:

Cumulative Percentage 100.xlsx (11.7 KB)

Thanks @Kal_Lam! This code work well.

1 Like