PC Review


Reply
Thread Tools Rate Thread

Calculate the difference between two times - getting '#VALUE!' err

 
 
=?Utf-8?B?TG91aXMgZGUgUG9pbnRlIGR1IExhYw==?=
Guest
Posts: n/a
 
      20th Jun 2007
I tried to use help, it gave me the same formula I was using, but when I try
to implement, I get the '#VALUE!' error.

Column A:
6/1/2007 9:30:51AM

Column B:
6/1/2007 9:33:08AM

Column C:
=SUM(B6-A6)

Office Help file:

1
2
A B
Start time End time
6/9/2007 10:35 AM 6/9/2007 3:30 PM
Formula Description (Result)
=B2-A2 Hours between two times with the cell formatted as "h" (4)
=B2-A2 Hours and minutes between two times with the cell formatted as "h:mm"
(4:55)
=B2-A2 Hours, minutes, and seconds between two times with the cell formatted
as "h:mm:ss" (4:55:00)
=TEXT(B2-A2,"h") Hours between two times (4)
=TEXT(B2-A2,"h:mm") Hours and minutes between two times (4:55)
=TEXT(B2-A2,"h:mm:ss") Hours, minutes, and seconds between two times
(4:55:00)



I've tried what the Help File says, but I still get the #VALUE! error.
If I hand type 9:30:51 in column A and 9:33:08 in column B, it works, but I
don't want to have to hand-type that, my queue system dumps a report with the
6/1/2007 9:30:51AM format, I want to be able to use that report.

Can anyone help?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      20th Jun 2007
Format all three cells as:

m/d/yyy [h]:mm:ss

and you should see:

6/1/2007 9:30:51 6/1/2007 9:33:08 1/0/1900 0:02:17


only the 2:17 is important here.
--
Gary''s Student - gsnu200731


"Louis de Pointe du Lac" wrote:

> I tried to use help, it gave me the same formula I was using, but when I try
> to implement, I get the '#VALUE!' error.
>
> Column A:
> 6/1/2007 9:30:51AM
>
> Column B:
> 6/1/2007 9:33:08AM
>
> Column C:
> =SUM(B6-A6)
>
> Office Help file:
>
> 1
> 2
> A B
> Start time End time
> 6/9/2007 10:35 AM 6/9/2007 3:30 PM
> Formula Description (Result)
> =B2-A2 Hours between two times with the cell formatted as "h" (4)
> =B2-A2 Hours and minutes between two times with the cell formatted as "h:mm"
> (4:55)
> =B2-A2 Hours, minutes, and seconds between two times with the cell formatted
> as "h:mm:ss" (4:55:00)
> =TEXT(B2-A2,"h") Hours between two times (4)
> =TEXT(B2-A2,"h:mm") Hours and minutes between two times (4:55)
> =TEXT(B2-A2,"h:mm:ss") Hours, minutes, and seconds between two times
> (4:55:00)
>
>
>
> I've tried what the Help File says, but I still get the #VALUE! error.
> If I hand type 9:30:51 in column A and 9:33:08 in column B, it works, but I
> don't want to have to hand-type that, my queue system dumps a report with the
> 6/1/2007 9:30:51AM format, I want to be able to use that report.
>
> Can anyone help?

 
Reply With Quote
 
=?Utf-8?B?Ymo=?=
Guest
Posts: n/a
 
      20th Jun 2007
It looks as though you actually have text and not a time value
if you use<format><cells><number> and change to general, does the cell change?
if not, it is text and you will have to convert it to a true time value.
Which version of excel are you using?

one way to generate a time value from separating the text into hours minutes
and seconds

hr =value(mid(date_time_text,find(":",date_time_tex)-2,2))
Min = value(mid(date_time_text,find(":",date_time_tex)+1,2))
Sec = value(left(right(date_time_text,4),2))
=time(hr,Min,Sec)

now the equations you referenced should work

"Louis de Pointe du Lac" wrote:

> I tried to use help, it gave me the same formula I was using, but when I try
> to implement, I get the '#VALUE!' error.
>
> Column A:
> 6/1/2007 9:30:51AM
>
> Column B:
> 6/1/2007 9:33:08AM
>
> Column C:
> =SUM(B6-A6)
>
> Office Help file:
>
> 1
> 2
> A B
> Start time End time
> 6/9/2007 10:35 AM 6/9/2007 3:30 PM
> Formula Description (Result)
> =B2-A2 Hours between two times with the cell formatted as "h" (4)
> =B2-A2 Hours and minutes between two times with the cell formatted as "h:mm"
> (4:55)
> =B2-A2 Hours, minutes, and seconds between two times with the cell formatted
> as "h:mm:ss" (4:55:00)
> =TEXT(B2-A2,"h") Hours between two times (4)
> =TEXT(B2-A2,"h:mm") Hours and minutes between two times (4:55)
> =TEXT(B2-A2,"h:mm:ss") Hours, minutes, and seconds between two times
> (4:55:00)
>
>
>
> I've tried what the Help File says, but I still get the #VALUE! error.
> If I hand type 9:30:51 in column A and 9:33:08 in column B, it works, but I
> don't want to have to hand-type that, my queue system dumps a report with the
> 6/1/2007 9:30:51AM format, I want to be able to use that report.
>
> Can anyone help?

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate the difference between two different times. Highbury 1 Microsoft Excel Worksheet Functions 1 24th Feb 2009 07:35 PM
Calculate difference in Times =?Utf-8?B?RGFycmVu?= Microsoft Excel Misc 13 16th Apr 2007 12:02 PM
calculate difference between two times =?Utf-8?B?a2Vu?= Microsoft Excel Worksheet Functions 6 21st Jul 2006 09:05 PM
Calculate the difference between two times Buffgirl71 Microsoft Excel Worksheet Functions 3 10th Feb 2006 12:05 AM
Re: Calculate difference between times Kim Microsoft Access Queries 1 13th Jan 2004 06:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:35 PM.