Code to check that total does not exceed 100%
I have a form that I need to enter percentages assigned for one to four people, the total cannot exceed 100%. Each field checks the field above it, adds the percentages, and an error message pops up if the total is over 100%.
Example 1:
Person 1 25% [under 100%, proceed to next field]
Person 2 25% [under 100%, proceed to next field]
Person 3 25% [under 100%, proceed to next field]
Person 4 35% [over 100%, error message "Total cannot exceed 100%"]
Example 2:
Person 1 25% [under 100%, proceed to next field]
Person 2 80% [over 100%, error message "Total cannot exceed 100%", stop checking]
Person 3
Person 4
I'm using a MAC but this should work on Windows as well.
Thanks for any help you can give me!
DP
