Skip to main content
Question

I need help with an IF statement.

  • February 22, 2022
  • 0 replies
  • 20 views

I need a total time worked for the day. But not all employees take a lunch. Right now this formula comes up blank if the employee didn't take a lunch. 
Total Day Worked=[Time Worked Formula]-[Lunch Formula]
I know I need an IF statement but not sure how to write it.

------------------------------
Cassie Hubble
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+22
  • Quickbase Alumni
  • February 22, 2022
One way to fix this is to fix the [Lunch Formula] field so that it calculates to a zero instead of a blank when the employee did not take a lunch. But if you want to kind of patch your existing formula you can do this  

Total Day Worked=[Time Worked Formula] - Nz([Lunch Formula])

The function Nz (.....) Will convert any Null values into a numeric Zero

------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------