Time as a minus value

R

Richardisa1

I am making a spreadsheet to record employees flexible working hours.
The standard week is 37 hours and sometimes people will work less tha
37 hours one week and work more the following week to make up th
difference. Therefore at the end of a week there could be a minus valu
to carry forward to the following week.

I have tried to use time values but Excel will not accept time as
minus value. I could use decimal time thus 08:30 am would be 8.50 bu
I would rather use time format. Can anyone suggest a way round th
problem.

Any help/suggestions would be appreciated
 
M

Mike H

Hi

Tools|options|Calculation
select 1904 date system
which allows negative hours

Mike
 
M

Mike H

Sorry I forgot to mention that this will mess up existing dates which will be
4 years and 1 day out so you may wish to consider whether using the 1904
system is for you.
 
R

Roger Govier

Hi Richard

Even though the negative time won't display, it just shows ###### the
negative value is still held there and can be used in subsequent
calculations.
Use the cell as you wish.
Perhaps hide the column so the ##'s don't show.
 
M

MartinW

Hi Richard,

Just to add to Roger's solution. Instead of hiding the #######,
you could use a custom format of [h]:mm;"Neg Value"
or some other variant.

In formatting anything before the semi colon relates to positive
values and anything after the semi colon relates to negative values.
It also extends into zero values and text.

Take a look here for a detailed explanation.
http://support.microsoft.com/default.aspx?id=264372

HTH
Martin
 
G

Geoff C

If displaying the actual amount is important to you, a slightly roundabout
way would be;

If x and y are the time cells
Put =if(x-y<0,-1,1) in one cell. Format this with a custom format "+";"-".
Put =max(x-y,y-x) in the next, formatted as time.

Use the -1/1 cell to multiply the positive time difference in other
calculations.

Some combination of these should work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top