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 How do I subtract time?

I read that you can do (B1-A1)*24 but for the values where A is in PM and B
is in AM this returns a negative hour much larger than what it should be.
Any recommendations? Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default How do I subtract time?

Try...

=(B1-A1+(B1<A1))*24

Hope this helps!

In article ,
Fletch74 wrote:

I read that you can do (B1-A1)*24 but for the values where A is in PM and B
is in AM this returns a negative hour much larger than what it should be.
Any recommendations? Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default How do I subtract time?

Try:

=MOD((B1-A1),1)*24

"Domenic" wrote:

Try...

=(B1-A1+(B1<A1))*24

Hope this helps!

In article ,
Fletch74 wrote:

I read that you can do (B1-A1)*24 but for the values where A is in PM and B
is in AM this returns a negative hour much larger than what it should be.
Any recommendations? Thanks.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How do I subtract time?

Thanks, both work. =D

"Toppers" wrote:

Try:

=MOD((B1-A1),1)*24

"Domenic" wrote:

Try...

=(B1-A1+(B1<A1))*24

Hope this helps!

In article ,
Fletch74 wrote:

I read that you can do (B1-A1)*24 but for the values where A is in PM and B
is in AM this returns a negative hour much larger than what it should be.
Any recommendations? Thanks.


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
Mileage Claim Formula johndavies New Users to Excel 4 August 14th 06 09:24 AM
formula to subtract time, 12:10 am (00:10) - 11:50 pm (23:10) ? teezee New Users to Excel 1 January 8th 06 11:11 PM
How to calculate Date & Time differences robs Excel Worksheet Functions 2 October 4th 05 04:22 PM
Excel Time Manipulation BFiedler Excel Discussion (Misc queries) 0 September 15th 05 01:15 AM
conditional formatting with time values Access Idiot Excel Discussion (Misc queries) 2 September 13th 05 03:29 PM


All times are GMT +1. The time now is 02:12 PM.

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

About Us

"It's about Microsoft Excel"