Hi, I need some help, I am counting the total hours worked of my employees, But I need a formula that won’t count the lunch time or that some how if table (lunch in) or (lunch out) is empty it won’t say NaN. some people take lunches, some don’t this is what I have it like this.
I have it to count hours worked before lunch and after lunch and add that all up. Screen Shot 2020-10-19 at 1.25.01 PM|700x99
Solved
Formula: time worked
Best answer by Jeremy_Oglesby
Hi, @Jennifer_Melo!
In both your hours before lunch and hours after lunch formulas, make the output dependent on the presence of a value in the Lunch out and Lunch in fields. Just wrap the whole formula you currently have in a conditional, like this:
IF(
{Lunch out},
<<your existing hours before lunch formula>>
)
IF(
{Lunch in},
<<your existing hours after lunch formula>>
)
Then, in your Total hrs Worked formula, use a different set of arithmetic based on the presence or lack of values in those fields:
IF(
AND({Lunch out}, {Lunch in}),
<<formula to add hours from those two fields>>,
<<formula to find hours between {Time in.} and {Time out.} instead>>
)
Login to the community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
