Displaying time

ruthtwigg

New Member
Joined
Jul 25, 2018
Messages
2
I'm trying to set up a spreadsheet that calculates peoplesworking hours but I'm getting into a pickle and keep getting the error #######,when trying to work out if people are over or under their expected workinghours.

I have effectively 3 columns, the first shows the number ofhours people are contracted to, the second is a calculation of the total numberof hours worked that week, and the third SHOULD be showing if there is a creditor defecit in the number of hours worked.

In the first column, I have the contracted number of hourspeople are due to work each week (mostly 37.5), so I have that displayed as37:30, under the format [hh]:mm, however everytime I click ok, it adds the date01/01/1900 onto the beginning of the cell, and this appears to be what iscausing issues with my later calculaiton
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
The display showing date shouldn't affect anything because excel stores dates and times as numbers essentially regardless. I suspect your issue lies in the fact that there is no such thing as "negative" time.

Basically, if your output is 1:00 - 2:00 you will get ####### because there is no way to show -1:00 in [hh]:mm format.
If you could post some of your formulas, perhaps we could assist with getting it to LOOK like what you need, however.

As a for instance, this might work....
=IF(SIGN(A2-B2)=-1,"-","") &TEXT(ABS(A2-B2),"[hh]:mm")
where A2 and B2 are the two date/times
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,643
Members
452,663
Latest member
MEMEH

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
Back
Top