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: 25
Default If time falls within time..

Hello,

I am using this formula (with thanks to Bob Phillips) to see if a block of
time falls with in a schedule:

'=MIN($W$1+TIME(0,30,0),$J4)-MAX($W$1,$I4)

W1 = 06:00
J4 = 14:30
I4 = 06:00

So I am really testing the half hour period of 6:00 and 06:30 to see if the
employee with the shift 06:00 to 14:30 is scheduled to work, which of course
he is.

I have two problems with this:

The cells that have the formula are formatted as time (13:30) and in my code
I have something that refers to "if the cell value is equal to "0:30" then
do something". In some cases, it is missing cells that it shouldn't.

The reason I formatted the cells to time in the first place is because some
cells were off fractionally, so I couldn't just say "if cell is = to 0.02083"

So - my first question is, what would be the best way to wrap my formula is
something (round, roundup??) that will force the result to the appropriate 30
minutes.

The second question is, how to I adapt the formula to account for the fact
that the shift end time in J4 may cross midnight. Also, the time in W1 may
cross midnight.

I understand the concepts, but I just can't get the formula right. Any help
would be very much appreciated!!
 
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
Formula to find Stop Time from Start Time and Total Minutes Jonathan Bickett Excel Worksheet Functions 5 March 7th 07 05:22 PM
how to calculate time start & time finish in quarter hour Peter Wu Excel Discussion (Misc queries) 3 June 7th 06 12:58 AM
template or formula for start time -finish time -total hours ple cc New Users to Excel 1 March 27th 06 06:06 PM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 02:36 PM
Remove time from a date and time field? Format removes the displa. oaoboc Excel Worksheet Functions 1 February 16th 05 07:20 PM


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