Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CJ CJ is offline
external usenet poster
 
Posts: 102
Default comparing times in excel

I have a list of start and end times. I need to weed out any hours that fall
between 8:00a and 17:00 (5:00p). I've tried several different formulas
without success so I'm hoping somebody can give me a formula to weed out
those hours. Here is a sample of the data I have:

a 11:04 14:26
b 17:16 18:52
c 16:11 17:00
d 21:37 21:39
e 7:12 7:16

In this data set, a and c are the lines that I want to give a value of 1
meaning it falls with regular work hours between 8:00a & 5:00p. Lines b, d
and e I want to give a value of 2 meaning it falls outside regular work hours.

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default comparing times in excel

Perhaps something like this:
=IF(OR(A2<TIMEVALUE("8:00"),B2TIMEVALUE("17:00"), 2,1)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"CJ" wrote:

I have a list of start and end times. I need to weed out any hours that fall
between 8:00a and 17:00 (5:00p). I've tried several different formulas
without success so I'm hoping somebody can give me a formula to weed out
those hours. Here is a sample of the data I have:

a 11:04 14:26
b 17:16 18:52
c 16:11 17:00
d 21:37 21:39
e 7:12 7:16

In this data set, a and c are the lines that I want to give a value of 1
meaning it falls with regular work hours between 8:00a & 5:00p. Lines b, d
and e I want to give a value of 2 meaning it falls outside regular work hours.

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default comparing times in excel


Try:

=IF(AND(A1=TIME(8,0,0),B1<=TIME(17,0,0)),1,2)

copied down.


--
NBVC

Where there is a will there are many ways.
'The Code Cage' (http;//www.thecodecage.com)
------------------------------------------------------------------------
NBVC's Profile: http://www.thecodecage.com/forumz/member.php?userid=74
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=116247

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
Comparing times.. [email protected] Excel Worksheet Functions 1 November 25th 07 03:16 AM
Comparing two times changetires Excel Discussion (Misc queries) 2 July 26th 06 10:25 PM
Comparing Calculated Times Mike Excel Worksheet Functions 2 July 3rd 06 04:30 AM
Comparing Times Just Learning Excel Discussion (Misc queries) 4 August 19th 05 06:27 PM
Comparing Times trumpy81 New Users to Excel 2 June 29th 05 11:01 AM


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