Struggling with TIME calculations ...

  • Thread starter Thread starter Greggy
  • Start date Start date
G

Greggy

Hey all...

Here's what I am trying to do:

A3 = 4:00am B3 = A3 - 1 I keeping getting #value error in B3 instead
of the result I am hoping to get which is 3:00am.

I have also tried the following in B3:

= A3 - TIME(1,0,0) ---> Again the #value error ...

Even tried = A3 - SUM(01:00)

Can anyone offer a suggestion.

Thanks,
Greg
 
That's the exact page I was using (I googled it). From this page I
tried the examples I have posted above.
 
If you put:
=isnumber(a3)

in another cell, do you get true or false.

I'm betting false. And that means that 4:00am isn't a real time.

But
4:00 AM
(note the extra space), is a real time.
 
OK ... I put in =isnumber(a3) and it said true.

HOWEVER .. I added the space so it looks like 4:00 AM and it was able
to work!!

So ... F3 4:00 AM G3 = F3 + TIME(1,0,0) I got the result of 5:00
AM. So great progress!!

However, F3 4:00 AM G3 = F3 - TIME(1,0,0) I get ############ instead
of 3:00 AM. Any ideas on subtracting an hour?

Thank you so much for the space after AM help!! :)

Greg
 
OK .. NOW the - 1 hour is working right now. So, I'm good for the time
being.

Thank you SOOO much for your help. I've been stuck on this all day. I
really appreciated it.

Greg
 
If the results are positive (or 0), it'll display ok.

But if your results are negative, then you'll see those ###### marks.

If you don't want to ever see negative times, you could use:

=max(0,f3-time(1,0,0))

But if you really want negative times, you can change a setting for that
workbook.

Tools|Options|calculation tab|check 1904 date system.

Be aware that every date in your workbook will be off by 4 years and a day. And
copying data between workbooks that have different base dates is a pain (not to
fix, but to notice and then fix).

If you want to change base dates, this may help adjust those dates (from a
previous post):

One workbook was using a base year of 1900 and the other was using 1904.
(tools|options|calculation tab|1904 date system)

One way to add those four years back is to find an empty cell, put 1462 into
that cell.

Copy that cell.

Select your range that contains the dates. Edit|PasteSpecial|click Add (in the
operation box).

You may have to reformat the cell as a date (mine turned to a 5 digit number).
But it should work.

You may want to do it against a copy...just in case.

(I'm not sure which one you'll fix. You may want to edit|pastespecial|click
subtract.)

Most windows users use 1900 as the base date. Mac users (mostly??) use 1904 as
the base date.
 
For the "time being"...was that a pun? <bg>
OK .. NOW the - 1 hour is working right now. So, I'm good for the time
being.

Thank you SOOO much for your help. I've been stuck on this all day. I
really appreciated it.

Greg
 
Hi Greg

Using XL2003 I get no problem with 4:00 AM in F3
G3=F3-TIME(1,0,0) quite correctly returns 3:00 AM
However, with 0:00 in F3, then I get your ########
This can be resolved with
=MOD(F3-TIME(1,0,0),1)
which will return 11:00 PM
 

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

Back
Top