#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
GEM GEM is offline
external usenet poster
 
Posts: 90
Default Subracting Time.

How do I subtract time?? For example

A1=20:00 HRS
B1=15:00 HRS
C1=(A1-B1)-1

I want to always subtract 1:00 hour from the result. , =(A1-B1)-1 I get,
######
How can I get 4:00 as the answer??
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Subracting Time.

Time is stored internally by Excel as fractions of a 24-hour day, so
do this:

=A1-B1-1/24

Hope this helps.

Pete

On Jan 29, 12:42*am, GEM wrote:
How do I subtract time?? For example

A1=20:00 HRS
B1=15:00 HRS
C1=(A1-B1)-1

I want to always subtract 1:00 hour from the result. , =(A1-B1)-1 I get,
######
How can I get 4:00 as the answer??


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Subracting Time.

The question is how are the times entered - are the enter as 15:00 meaning 15
hours or 3 PM?

If you subtract 20 from 15 you get a negative number and then you subtract
another 1, more negative. If the cell where the formula is is formatted to
time you will get #####. Excel does not handle times as negative.


--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"GEM" wrote:

How do I subtract time?? For example

A1=20:00 HRS
B1=15:00 HRS
C1=(A1-B1)-1

I want to always subtract 1:00 hour from the result. , =(A1-B1)-1 I get,
######
How can I get 4:00 as the answer??

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Subracting Time.

My appologies for the last email I read B1-A1.

In your case the problem is the -1. 1 represents an entire day. whereas 1
hour should be entered as =1/24

My comments about Excel handling negative numbers are still correct.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"GEM" wrote:

How do I subtract time?? For example

A1=20:00 HRS
B1=15:00 HRS
C1=(A1-B1)-1

I want to always subtract 1:00 hour from the result. , =(A1-B1)-1 I get,
######
How can I get 4:00 as the answer??

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Subracting Time.

Except when the workbook uses the 1904 date system.

Shane Devenshire wrote:

My appologies for the last email I read B1-A1.

In your case the problem is the -1. 1 represents an entire day. whereas 1
hour should be entered as =1/24

My comments about Excel handling negative numbers are still correct.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire

"GEM" wrote:

How do I subtract time?? For example

A1=20:00 HRS
B1=15:00 HRS
C1=(A1-B1)-1

I want to always subtract 1:00 hour from the result. , =(A1-B1)-1 I get,
######
How can I get 4:00 as the answer??


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
GEM GEM is offline
external usenet poster
 
Posts: 90
Default Subracting Time.

Perfect, it worked!! Thanks!!!

"Shane Devenshire" wrote:

My appologies for the last email I read B1-A1.

In your case the problem is the -1. 1 represents an entire day. whereas 1
hour should be entered as =1/24

My comments about Excel handling negative numbers are still correct.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"GEM" wrote:

How do I subtract time?? For example

A1=20:00 HRS
B1=15:00 HRS
C1=(A1-B1)-1

I want to always subtract 1:00 hour from the result. , =(A1-B1)-1 I get,
######
How can I get 4:00 as the answer??

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Subracting Time.

One mo

=a1-b1-time(1,0,0)



GEM wrote:

How do I subtract time?? For example

A1=20:00 HRS
B1=15:00 HRS
C1=(A1-B1)-1

I want to always subtract 1:00 hour from the result. , =(A1-B1)-1 I get,
######
How can I get 4:00 as the answer??


--

Dave Peterson
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
straight time, time and a half, and double time Jeremy Excel Discussion (Misc queries) 3 September 23rd 08 09:03 PM
Calculate Ending time using Start Time and Elapsed Time Chief 711 Excel Worksheet Functions 5 May 13th 08 04:34 PM
adding and subracting credits dmedina Excel Worksheet Functions 2 November 30th 07 09:42 PM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 02:36 PM
Subracting Dates to come up with the # of days between them KimberlyC Excel Worksheet Functions 8 December 20th 04 09:46 PM


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