Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Well Missy
 
Posts: n/a
Default Subtract Dates based on 24 hour system

I have an equation where I am subtract time based on 24 hours. For example,

1:00 a.m. - 23:00 p.m. = 2

how do I build the equation to obtain an answer of 2 hours? Help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Subtract Dates based on 24 hour system

Since you're crossing over midnight, try something like this:

For
A1: 1:00
B1: 23:00
C1: =MOD(+A1-B1,1)

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Well Missy" wrote:

I have an equation where I am subtract time based on 24 hours. For example,

1:00 a.m. - 23:00 p.m. = 2

how do I build the equation to obtain an answer of 2 hours? Help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sandy Mann
 
Posts: n/a
Default Subtract Dates based on 24 hour system

Missy,

Assuming:
23:00 pm means 11:00 PM (23:00 pm is text NOT an Excel time)

A1= 01:00 (or 1:00 AM)
B1= 23:00 (or 23:00 PM)

try:
=((A1-B1)+(A1<B1)) formatted as time or

=((A1-B1)+(A1<B1))*24 formatted as General for the number 2 or

=MOD(A1-B1,1) for time or

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

--
HTH

Sandy

with @tiscali.co.uk


"Well Missy" wrote in message
...
I have an equation where I am subtract time based on 24 hours. For
example,

1:00 a.m. - 23:00 p.m. = 2

how do I build the equation to obtain an answer of 2 hours? Help.



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
Average based on Hour Mike Punko Excel Worksheet Functions 7 September 15th 05 09:14 PM
Calculating Due Dates Based on Payments Eric Hanson Excel Worksheet Functions 2 January 6th 05 02:41 AM
How can i filter dates based on day of month Saurabh Excel Worksheet Functions 1 December 12th 04 05:36 PM
I have a list of dates that I need to count based on a date range ejb030353 Excel Worksheet Functions 4 November 24th 04 02:27 PM
Totals based on dates DJ Dusty Excel Worksheet Functions 1 November 16th 04 10:39 PM


All times are GMT +1. The time now is 03:26 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"