• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Define 24 hrs shift

mauriciomtzz

New Member
and try to identify the shift between labor hours per example

7:30 am to 15:30 PM 1 shift

15:30 pm to 23:00 PM 2 shift

23:00 pm to 7:29 AM 3 shift


I did convert the hours as follow =TEXT(A1,"hhmm"), and in other cell the condition

=IF(a29<1530,1,2))
 
Welcome to the forums!


This looks like a very similar problem...perhaps it will work for you?

http://chandoo.org/forums/topic/pulling-a-rabbit-out-of-a-hat-or-converting-timestamp-to-a-shift
 
Hours and minutes are the fractional part of a date. =Int(now()) will give you the date of today without any time component. Likewise, =now() - int(now()) will give you today's time without any date (the "zeroeth of Jan, 1900). Just format the cell as time, and you'll see only the time.


Now, you can put 1530 into a cell (format as time), and 730 into a cell (format as time), and compare that to your time target.


You don't need to convert to text. The computer doesn't see time as text, but as an integer portion (date after Jan 0, 1900), and a fractional portion (time of that date).


HTH,

Don
 
Back
Top