Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Subtracting Times

I am attempting to add my project hours in MS Excel. Column A is
start time (ex. 11:00am with "time" format), column B is stop time
(ex. 2pm with "time" format). I want column C to take the difference
between columns A and B and put it into Column C. For the given
example, column C should be 3. It tried the following solutions:
1. = B2-A2+IF(A2B2,1)
2. = B2-A2

Additionally, when press "Enter" to compute the formula, #VALUE!
appears in box. How can get the difference to come out correctly?

Thanks,

Steve

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Subtracting Times

Try:

=MOD(B2-A2,1)

HTH

" wrote:

I am attempting to add my project hours in MS Excel. Column A is
start time (ex. 11:00am with "time" format), column B is stop time
(ex. 2pm with "time" format). I want column C to take the difference
between columns A and B and put it into Column C. For the given
example, column C should be 3. It tried the following solutions:
1. = B2-A2+IF(A2B2,1)
2. = B2-A2

Additionally, when press "Enter" to compute the formula, #VALUE!
appears in box. How can get the difference to come out correctly?

Thanks,

Steve


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Subtracting Times

Check that A2 and B2 really do contain time data, rather than text
strings that just happen to look like time format - your example for
B2 (2pm) doesn't look like it is correct. It might also help to change
the time format to the 24-hour clock.

Hope this helps.

Pete

On Feb 19, 4:34 pm, wrote:
I am attempting to add my project hours in MS Excel. Column A is
start time (ex. 11:00am with "time" format), column B is stop time
(ex. 2pm with "time" format). I want column C to take the difference
between columns A and B and put it into Column C. For the given
example, column C should be 3. It tried the following solutions:
1. = B2-A2+IF(A2B2,1)
2. = B2-A2

Additionally, when press "Enter" to compute the formula, #VALUE!
appears in box. How can get the difference to come out correctly?

Thanks,

Steve



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Subtracting times gaftalik Excel Discussion (Misc queries) 3 November 2nd 05 06:45 PM
Subtracting two times in hh:mm:ss format A Khan Excel Discussion (Misc queries) 4 March 23rd 05 05:47 PM
Subtracting Times NChris Excel Worksheet Functions 1 February 10th 05 09:29 PM
Subtracting times [email protected] Excel Discussion (Misc queries) 1 January 12th 05 09:55 AM
Subtracting Times tvhazlett Excel Worksheet Functions 1 November 29th 04 05:05 PM


All times are GMT +1. The time now is 05:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"