JanaBaker
8 years agoQrew Cadet
Nested If Formula Error: Expecting Boolean but found number
Hey everybody! Can someone help me with the below formula? I get the "expecting Boolean but found number" error at the end of the FIRST If statement. If i change it to NULL, then the 2nd IF statement turns yellow saying it expects a different outcome as well. :(
What this formula says is:
If(
[Cost Center Name] = "TO Service Mgmt" and [REG Override] = true, 8 - Sum([FHL Form],[PTO Form],[JRY Form],[SCK Form],[Time without Pay Form],[Unscheduled PTO Form],[FNL Form],[FMLA Form],[HOL Hours],[Other Form]), 0,
[Cost Center Name] <> "TO Service Mgmt" and [REG Override] = false and ([Day of Week] = "Sat" or [Day of Week] = "Sun"), 0,
Sum([FHL Form],[PTO Form],[JRY Form],[SCK Form],[Time without Pay Form],[Unscheduled PTO Form],[FNL Form],[FMLA Form],[HOL Hours],[Other Form]) > = 8, 0, 8 - Sum([FHL Form],[PTO Form],[JRY Form],[SCK Form],[Time without Pay Form],[Unscheduled PTO Form],[FNL Form],[FMLA Form],[HOL Hours],[Other Form])
)
When i comment out the 1st IF statement, the formula works, but i think i STILL have something wrong with the formula b/c it automatically checks the REG Override box for all Days of Week for Mon - Fri for TO Service Mgmt Cost Center and none are checked for NON TO Service Mgmt Cost Center (which is an expected behavior).
The expected behavior is for the person to check the box to override the REG value if they work random days throughout the week. With that said, the box should always be unchecked unless specifically checked.
Hopefully that makes sense.
Thank you in advance!!
What this formula says is:
- TO Service Mgmt is the only Cost Center who can check the checkbox to override a field called "REG" (where the formula below lives).
- The REG formula defines if the employee worked 8 hours that day or not.
- The TO Service Mgmt Cost Center can work Sat/Sun and the rest of the CC's are Mon - Fri shifts, therefore, Sat & Sun should = 0.
If(
[Cost Center Name] = "TO Service Mgmt" and [REG Override] = true, 8 - Sum([FHL Form],[PTO Form],[JRY Form],[SCK Form],[Time without Pay Form],[Unscheduled PTO Form],[FNL Form],[FMLA Form],[HOL Hours],[Other Form]), 0,
[Cost Center Name] <> "TO Service Mgmt" and [REG Override] = false and ([Day of Week] = "Sat" or [Day of Week] = "Sun"), 0,
Sum([FHL Form],[PTO Form],[JRY Form],[SCK Form],[Time without Pay Form],[Unscheduled PTO Form],[FNL Form],[FMLA Form],[HOL Hours],[Other Form]) > = 8, 0, 8 - Sum([FHL Form],[PTO Form],[JRY Form],[SCK Form],[Time without Pay Form],[Unscheduled PTO Form],[FNL Form],[FMLA Form],[HOL Hours],[Other Form])
)
When i comment out the 1st IF statement, the formula works, but i think i STILL have something wrong with the formula b/c it automatically checks the REG Override box for all Days of Week for Mon - Fri for TO Service Mgmt Cost Center and none are checked for NON TO Service Mgmt Cost Center (which is an expected behavior).
The expected behavior is for the person to check the box to override the REG value if they work random days throughout the week. With that said, the box should always be unchecked unless specifically checked.
Hopefully that makes sense.
Thank you in advance!!