Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
magecca
 
Posts: n/a
Default Time formula, complicated?


I'm trying to make a simple spreadsheat, in which i type in my work
start and end time, then I have some cells that have time hours
(07:00-21:00) at each cell it calculates whether it's time IE: 07:00
falls between the time entered, if it does it puts "XX" if not "--"

the forula I use:
Code:
--------------------
=IF(G$2=$D3,IF(G$2<=$F3, "XX", "--"), "--")
--------------------

And it works, so far but I want each "X" or "-" to represent thirty
minutes, I just can't figure out the formula to tell if it is A the
beginning of the shift and it begins at .5 make the mark be "-X" or if
B it's the end of the shift and it ends at .5 make the mark "X-"

See the image attached. Much obliged for any help you may provide
-Thanks


+-------------------------------------------------------------------+
|Filename: Shedule_Simple.png |
|Download: http://www.excelforum.com/attachment.php?postid=4086 |
+-------------------------------------------------------------------+

--
magecca
------------------------------------------------------------------------
magecca's Profile: http://www.excelforum.com/member.php...o&userid=29250
View this thread: http://www.excelforum.com/showthread...hreadid=489734

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Time formula, complicated?

=IF(OR($D3G$2+1/48,$F3<G$2-1/48),"--",IF(AND($D3<=G$2,$F3=G$2),"XX",IF($D3
=G$2+1/48,"-X","X-")))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"magecca" wrote in
message ...

I'm trying to make a simple spreadsheat, in which i type in my work
start and end time, then I have some cells that have time hours
(07:00-21:00) at each cell it calculates whether it's time IE: 07:00
falls between the time entered, if it does it puts "XX" if not "--"

the forula I use:
Code:
--------------------
=IF(G$2=$D3,IF(G$2<=$F3, "XX", "--"), "--")
--------------------

And it works, so far but I want each "X" or "-" to represent thirty
minutes, I just can't figure out the formula to tell if it is A the
beginning of the shift and it begins at .5 make the mark be "-X" or if
B it's the end of the shift and it ends at .5 make the mark "X-"

See the image attached. Much obliged for any help you may provide
-Thanks


+-------------------------------------------------------------------+
|Filename: Shedule_Simple.png |
|Download: http://www.excelforum.com/attachment.php?postid=4086 |
+-------------------------------------------------------------------+

--
magecca
------------------------------------------------------------------------
magecca's Profile:

http://www.excelforum.com/member.php...o&userid=29250
View this thread: http://www.excelforum.com/showthread...hreadid=489734



  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Time formula, complicated?

I think this is due to floating point arithmetic. I can get around it, don't
like it, but I can, with

=IF(OR($D3G$2+1/48,ROUND($F3+1/48,6)<=ROUND(G$2,6)),"--",IF(AND($D3<=G$2,RO
UND($F3,6)ROUND(G$2+1/48,6)),"XX",IF($D3=G$2+1/48,"-X","X-")))

Let us know if that sorts it.

Do you want a formula to count the X's and convert to hours worksed?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"magecca" wrote in
message ...

Bob Phillips Wrote:
It works exactly as you indicate that you want in my tests. What do you
see,
and please tell me, not an image, I don't access this through
ExcelForum.


For example if the -Start- was *10:30* under the "*10*" column i get
the appropriate "-X" (thank you) and if the -End- time is *20:30* all
the colums are correct until the "*20*" column where is has the
incorrect "XX" and the "21" column as the "X-" when the "*20*" colum is
the one which should have that value ("X-"), depecting half of the 20th
hour.

Forgive me if this is rather difficult to explain. I can not thank you
enough for your help.


--
magecca
------------------------------------------------------------------------
magecca's Profile:

http://www.excelforum.com/member.php...o&userid=29250
View this thread: http://www.excelforum.com/showthread...hreadid=489734



  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Time formula, complicated?

One more shot

=IF(AND($D3G$2,$D3<G$2+1/24,$F3G$2),"-X",
IF(AND($D3<G$2,$F3G$2,$F3<G$2+1/24),"X-",
IF(AND($D3<=G$2,$F3=G$2),"XX","--")))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"magecca" wrote in
message ...

Mr. Phillips,
Now no matter if the hour is whole or half it puts the half mark "X-"
at the end time. Should I attach the spreadsheet? Maybe "Floor" or
"Ceil" if they are availabe instead of "Round"? Sure, I may be able to
use that formula, thank you. Perhaps maybe split up the whole and
halves to it's own column but that will make my spreadsheet way larger
than I intended.
Thanks for all your time -Matt

Bob Phillips Wrote:
I think this is due to floating point arithmetic. I can get around it,
don't
like it, but I can, with


=IF(OR($D3G$2+1/48,ROUND($F3+1/48,6)<=ROUND(G$2,6)),"--",IF(AND($D3<=G$2,RO
UND($F3,6)ROUND(G$2+1/48,6)),"XX",IF($D3=G$2+1/48,"-X","X-")))

Let us know if that sorts it.

Do you want a formula to count the X's and convert to hours worksed?



--
magecca
------------------------------------------------------------------------
magecca's Profile:

http://www.excelforum.com/member.php...o&userid=29250
View this thread: http://www.excelforum.com/showthread...hreadid=489734



  #5   Report Post  
Posted to microsoft.public.excel.misc
magecca
 
Posts: n/a
Default Time formula, complicated?


Thank you! That's what I am looking for. Now I have to try to understand
it [o: hehe. Thank you again!
Bob Phillips Wrote:
One more shot
=IF(AND($D3G$2,$D3<G$2+1/24,$F3G$2),"-X",
IF(AND($D3<G$2,$F3G$2,$F3<G$2+1/24),"X-",
IF(AND($D3<=G$2,$F3=G$2),"XX","--")))



--
magecca
------------------------------------------------------------------------
magecca's Profile: http://www.excelforum.com/member.php...o&userid=29250
View this thread: http://www.excelforum.com/showthread...hreadid=489734



  #6   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Time formula, complicated?

Great, I am glad we finally made it :-))

Bob


"magecca" wrote in
message ...

Thank you! That's what I am looking for. Now I have to try to understand
it [o: hehe. Thank you again!
Bob Phillips Wrote:
One more shot
=IF(AND($D3G$2,$D3<G$2+1/24,$F3G$2),"-X",
IF(AND($D3<G$2,$F3G$2,$F3<G$2+1/24),"X-",
IF(AND($D3<=G$2,$F3=G$2),"XX","--")))



--
magecca
------------------------------------------------------------------------
magecca's Profile:

http://www.excelforum.com/member.php...o&userid=29250
View this thread: http://www.excelforum.com/showthread...hreadid=489734



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
Formula is entering a default time when it comes across an empty cell.. Howie Excel Worksheet Functions 10 November 16th 05 11:34 AM
Formula TIME question Pharmagirl Excel Discussion (Misc queries) 1 November 14th 05 09:52 PM
Formula to deduct unpaid breaks in time sheet Rick Excel Discussion (Misc queries) 3 August 26th 05 11:53 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Time Date Formula Problem Oowf Excel Worksheet Functions 2 June 1st 05 06:01 PM


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