robpertraymond

New Member
I'm having trouble with a formula for a sign-in/out spreadsheet that tracks hours:

For each individual person I have 2 sign-in and 2 sign-out times (in case they sign in and out multiple times in a day). I have this formula: (sign out 1 - sign in 1) + (sign out 2 - sign in 2) for the total hours cell OR =(D3-C3)+(F3-E3).

The problem is that when someone signs in, before they sign back out, I get a ###### error message in the 'total' hours cell because it is referring empty cells. It is only resolved when I add a sign-out time. I tried to add this formula in the 'total' cell: =IFERROR((D3-C3)+(F3-E3), "") but I get an error message that reads "Inconsistent formula". My goal is to make it so that when someone signs in, instead of seeing the ###### error message in the 'total' cell until they sign back out, the 'total' cell has a blank string (" ") or even changes to a different color until a sign-out time is entered.

Any help is appreciated, thanks!

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Rick Rothstein

MrExcel MVP
Maybe this...

=IF(OR(C3="",E3=""),"",(D3-C3)+(F3-E3))

robpertraymond

New Member
Hmmm that seems to work to insert an empty string in place of the ######'s, but it stays empty when when I add a sign-out time.

What is that function doing exactly?

Rick Rothstein

MrExcel MVP
Hmmm that seems to work to insert an empty string in place of the ######'s, but it stays empty when when I add a sign-out time.

What is that function doing exactly?
It looks to see if either C3 or E3 is blank... if either one is, it outputs the empty string (""). So, the only way a value is output is if, at minimum, both C3 and E3 have values in them. You will note that I originally introduced the formula by saying "Maybe this"... I really am not sure under what circumstance you want values displayed and under what circumstances you want "" displayed

Replies
0
Views
143
Replies
7
Views
474
Replies
5
Views
137
Replies
1
Views
753
Replies
15
Views
508

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,982
Messages
5,834,703
Members
430,310
Latest member
Excelorate3305

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back