LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Simple problem with Dates and Times is driving me nuts

I am trying to do some calculations with Date and Time that should be
simple but I keep getting a #VALUE! result. I hope someone here can
help.

Column A is StartDate
Column B is StartTime
ColumnC is EndDate
Column D is EndTime

Columns A and C are formatted as m/d/yyyy
Columns B and D are formatted as hh:mm AM or PM

Column A starts with the first day of the month in the first row and
each subsequent row is the previous one +1 (A2=A1+1, etc)

Column C is copied from Column A (C1=A1, etc) and there are some
macros that modify this when someone has worked overnight and C1=A1+1

OK, so you would think that this would be the easiest thing in the
world, right?

TimeWorked=((C1+D1)-(A1+B1))*24

The EndTimes aredownloaded from a time clock that formats each
employees time sheet in Excel 5 Tabular format. I am using Excel 2007.
I open the sheet for each employee and cut and paste the EndTime
directly into my sheet and format this column just like column B with
format painter.

The result of the TimeWorked column is #VALUE! and only results in a
number if I manually write in the EndTime. For example, if the result
of the cut and paste is 5:40 PM formatted as Time hh:mm, it will only
result in a number if I manually overwrite this with 5:40 PM.

So the next step is to look "Show Calculation Steps" when I click on
the exclamation point next to the #VALUE!. This shows that the EndDate
is the culprit and causes the TimeWorked eq'n to choke because it
shows up as a 5 digit number as if the format is General. However,
that column is formatted as m/d/yyyy. How can I change this so that I
don't have to manually retype every EndTime?

Thanks in advance

BB
 
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
i know this is simple, but driving me nuts - formula [email protected] Excel Worksheet Functions 2 May 2nd 06 08:22 PM
Need Help, this is driving me nuts heitorfjr Excel Discussion (Misc queries) 2 January 15th 06 03:10 PM
question driving me nuts Esaam Excel Discussion (Misc queries) 3 December 1st 05 06:03 PM
Sum and Count are driving me nuts!! Mattrapps Charts and Charting in Excel 1 May 9th 05 07:08 PM
Excel / VB is driving me nuts!! Andrew Excel Worksheet Functions 2 November 29th 04 04:06 AM


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