# Formula for sum validation

UPDATED QUESTION: I need a validation formula (no client side java) that ensures the following:

Fields: Time 1 = Total Time in hours (i.e. 8 or 8.5) Time 2 = Optional Subset1 of total time Time 3 = Optional Subset2 of total time Widget 1 = Optional entry in whole number (i.e. 1, 2, 8)

1. If any number is entered into Widget 1, Time 2 requires an entry
2. Time 2 + Time 3 cannot equal more than Time 1

Thanks for any help.

• Are all three fields required? – Erin L Apr 20 '16 at 21:00

Since you are comparing multiple fields you should do this in the list validation settings.

Are your fields date/time or number?

I have a formula I will share that checks if one date field is larger than other. I would think you could add your two date fields together and check.

``````=AND(AND((ISBLANK([Projected Completion Time])=FALSE),([Projected Completion Time]>[Start Time])),OR(ISBLANK([Actual Completion Time])=TRUE,([Actual Completion Time]>[Start Time])))
``````
• The fields would be numbers. I should have been more clear. It's literally the equivalent of 1+2 can't be more than 3. – Andrew Bowers Apr 22 '16 at 13:24
• I think you can do something like this: =([Column1]+[Column2])<[Column3] Reference: support.office.com/en-us/article/… – Josh Swearingen Apr 22 '16 at 21:37

`=[Number 1]+[Number 2]<=[Number 3]`

If any of the fields are optional, you'll have to add some `NOT(ISBLANK())` checking.