Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default SET A CONDITION

I have the total number of hours and minutes between two dates and
times. but I also need to set a condition that checks whether the hours
have exceeded 24 hours.

For e.g. if 23/10/05 10:30 (Start time)
25/10/05 10:30 (End time)

Total no of hours is 47hours and 45 minutes.

I want to set a condition that will check if the hours exceed 24 hours
if so then comes with a message. I have tried IF function but it
doesnot check the minutes.

Please help

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default SET A CONDITION

Hi,

From your example, with the start time in cell A1 and end time in cell

A2,
=A2-A1 would produce a result of 2 (or times 24 = 48 hours)
For the formula :
=IF((A2-A1)*2424,"Exceeds 24 H",(A2-A1)*24)
should do the job ...

HTH
Cheers
Carim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default SET A CONDITION

time/date are stored as the number of days since january 1 1900.
Before the decimal point represents the number of days and therefore the
date, after the decimal point represents the time.
So simpy subtract your two date/times from each other. If 1 then that means
more than one day.

--
--
Adrian D.Bailey, Information and Systems Manager, Dept.Human Sciences
Loughborough University, Loughborough Leics, LE11 3TU, UK.
Tel: 01509 223007 Fax: 01509 223940

Community Warden, Storer and Burleigh Areas. Out-of-hours Tel: 01509 563263
--

wrote in message
oups.com...
I have the total number of hours and minutes between two dates and
times. but I also need to set a condition that checks whether the hours
have exceeded 24 hours.

For e.g. if 23/10/05 10:30 (Start time)
25/10/05 10:30 (End time)

Total no of hours is 47hours and 45 minutes.

I want to set a condition that will check if the hours exceed 24 hours
if so then comes with a message. I have tried IF function but it
doesnot check the minutes.

Please 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
lookup with multiple condition, but one condition to satisfy is en Eddy Stan Excel Worksheet Functions 2 October 27th 07 02:06 PM
Combine an OR condition with an AND condition Will Excel Discussion (Misc queries) 1 April 6th 07 03:52 PM
Condition Sum Gos-C Excel Worksheet Functions 3 February 17th 06 05:27 AM
Condition 1 overules condition 2? Bultgren Excel Worksheet Functions 2 January 20th 06 12:29 PM
I need 4 condition for condition formatting SeeKY Excel Programming 2 June 7th 05 09:41 AM


All times are GMT +1. The time now is 01:16 AM.

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"