Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2007

Tip: Looking for answers? Try searching our database.

Math comparison and time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard Lewis Haggard - 13 Jul 2007 21:13 GMT
I am using a spreadsheet that my client wants filled out to track time spent
on various projects. I want to highlight cells where elapsed time as
calculated from time in/out doesn't agree with the sum of time for projects.
I know how to do a conditional format to make the cell display its text in
color but I'm having trouble getting the calculation comparison right. The
problem is that the cells that contain the time in/out are formatted to
contain time as hh:mm but the time spent on the various projects is a number
that represents hours expressed as a decimal.

As an example:
Asumme that the In time is 8:30
the Lunch Out time is 12:00
the Lunch In time is 12:30
the Out time is 17:00

The time for Project 1 is three and half hours and so is entered as 3.5
The time for Project 2 is four and a half hours and so is entered as 4.5.

Summing the project time gives 8.0.
(Lunch Out - In) + (Out - Lunch In) = 8:00.

The spread sheet has a cell that is the sum of the individual project times.
I want it to display as red when this value is different from the elapsed
time from the various in and outs for the day. How to I generate the
appropriate value to compare against the cell whose value is generated from
the sum of the project elapsed times?
Signature

Richard Lewis Haggard
General: www.Haggard-And-Associates.com
Please come visit here for a couple thousand good giggles!:
www.haggard-and-associates.com/Humor/humor.htm

T. Valko - 13 Jul 2007 22:07 GMT
To compare formatted TIME to a decimal value you have to either multiply the
formatted time by 24 or divide the decimal value by 24. I prefer the former:

A1 = 40:00 (formatted as [h]:mm)
B1 = 40 (decimal value formatted as GENERAL or NUMBER)

=A1*24=B1

=B1/24=A1

Both results are TRUE

Signature

Biff
Microsoft Excel MVP

>I am using a spreadsheet that my client wants filled out to track time
>spent on various projects. I want to highlight cells where elapsed time as
[quoted text clipped - 22 lines]
> the appropriate value to compare against the cell whose value is generated
> from the sum of the project elapsed times?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.