Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Timeless Excel
 
Posts: n/a
Default Time Keeping

I'm trying to make a time sheet for myself but my time keeps coming up
negative.
in cell a1 i have 9:00 AM (with the cell formated as time h:mm PM) and cell
b1 5:00 PM (with the cell formated as time h:mm PM) and cell c1 formated as
number (with formula (A1-B1)*24 . I'm getting 8 hours but it is coming out
negative.
so my cells look like this
9:00 AM 5:00 PM -8.00
What am i doing wrong? How can i get a positive number?

  #3   Report Post  
Posted to microsoft.public.excel.newusers
bpeltzer
 
Posts: n/a
Default Time Keeping

Subtract the start time from the end time, rather than the other way around:
=(b1-a1)*24.

"Timeless Excel" wrote:

I'm trying to make a time sheet for myself but my time keeps coming up
negative.
in cell a1 i have 9:00 AM (with the cell formated as time h:mm PM) and cell
b1 5:00 PM (with the cell formated as time h:mm PM) and cell c1 formated as
number (with formula (A1-B1)*24 . I'm getting 8 hours but it is coming out
negative.
so my cells look like this
9:00 AM 5:00 PM -8.00
What am i doing wrong? How can i get a positive number?

  #4   Report Post  
Posted to microsoft.public.excel.newusers
David McRitchie
 
Posts: n/a
Default Time Keeping

Hi _____,
Actually if a time interval went through midnight you would get a negative number even
with the "correct" formula (end-start). So you would want to add 24 hours (= 1 day)
in the calculation.
=((B1-A1)+(A1B1))*24 format as a number (not as time), or as
=(B1-A1)+(A1B1) format as h:mm (as an Excel time, [h]:mm for a total)
The A1B1 is a logical it will return 0 or 1
Excel dates and times are the number of days (and fractional days) pas a reference date.

For more information on Date and Time see
http://www.mvps.org/dmcritchie/excel/datetime.htm
http://www.cpearson.com/excel/datetime.htm
--
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Niek Otten" wrote in message ...
=(B1-A1)*24

--
Kind regards,

Niek Otten

"Timeless Excel" <Timeless wrote in message
...
I'm trying to make a time sheet for myself but my time keeps coming up
negative.
in cell a1 i have 9:00 AM (with the cell formated as time h:mm PM) and
cell
b1 5:00 PM (with the cell formated as time h:mm PM) and cell c1 formated
as
number (with formula (A1-B1)*24 . I'm getting 8 hours but it is coming out
negative.
so my cells look like this
9:00 AM 5:00 PM -8.00
What am i doing wrong? How can i get a positive number?





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
Entering Times Denise Excel Discussion (Misc queries) 9 November 15th 05 04:57 PM
Imported Date & Time format with calcs. managed in excel from imrp Todd F. Excel Worksheet Functions 0 July 8th 05 09:03 PM
time differences in a column 68magnolia71 Excel Worksheet Functions 3 May 9th 05 09:46 PM
Accumulate weekly time to total time in Excel. delve Excel Discussion (Misc queries) 0 May 4th 05 08:14 PM
Time Sheet Calculation Help Needed! sax30 Excel Worksheet Functions 2 April 26th 05 08:08 PM


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