Question about replacing "railroad" or multiple ######'s with a blank cell

robpertraymond

New Member
Joined
Sep 25, 2014
Messages
5
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!
 

Some videos you may like

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
36,675
Office Version
  1. 2010
Platform
  1. Windows
Maybe this...

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

robpertraymond

New Member
Joined
Sep 25, 2014
Messages
5
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
Joined
Apr 18, 2011
Messages
36,675
Office Version
  1. 2010
Platform
  1. Windows
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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,216
Messages
5,594,886
Members
413,947
Latest member
gizmolucy

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top