#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Time Code

Could I please get some advise on a code for time, I have a shift that
starts at 19:00 and this person finishes at 07:00 the next day. How do I
write the code as the (07:00-19:00) e4-c4 does not calculate.

Thanks again

Greg


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default Time Code

Hi Greg

=E4-C4+(E4<C4)

HTH. best wishes Harald

"Greg Brow" skrev i melding
...
Could I please get some advise on a code for time, I have a shift that
starts at 19:00 and this person finishes at 07:00 the next day. How do I
write the code as the (07:00-19:00) e4-c4 does not calculate.

Thanks again

Greg




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Time Code

one mo

=MOD(C4-E4,1)

Note that both Harald's and this one will work with any two times that are
within 24 hours of each other.

--
Regards,
Tom Ogilvy

"Harald Staff" wrote in message
...
Hi Greg

=E4-C4+(E4<C4)

HTH. best wishes Harald

"Greg Brow" skrev i melding
...
Could I please get some advise on a code for time, I have a shift that
starts at 19:00 and this person finishes at 07:00 the next day. How do

I
write the code as the (07:00-19:00) e4-c4 does not calculate.

Thanks again

Greg






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
Time with VBA code Dale G[_2_] Excel Discussion (Misc queries) 8 September 23rd 09 11:22 PM
Time code albertmb Excel Discussion (Misc queries) 0 February 23rd 09 11:59 AM
Run-time error from my code Matt Excel Programming 5 June 24th 04 03:32 AM
Same VBA code, different run time Bill Li Excel Programming 1 October 14th 03 06:04 AM
Code runs every other time Mike Waldron Excel Programming 1 September 27th 03 03:54 PM


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