Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old June 5th 19, 04:57 PM posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
First recorded activity by ExcelBanter: May 2015
Posts: 8
Default calculating am or pm shift

I’ve been asked to create a formula to tell whether a single cell’s time is either AM or PM shift. Our AM shift is 05:45 to 15:45 while our PM shift is 15:46 to 01:15 the next day.

B3 is formatted to: m/d/yyyy h:mm and contains 1/2/2019 3:50:19 PM

I’ve tried =IF(AND(B3=TIMEVALUE("05:45:00"),B3<=TIMEVALUE("1 5:45:00")),"AM","PM")

While the results show PM and this is correct, the cell above it contains 1/02/2019 3:13:24 and should result in AM … but it results in PM as well.

What am I doing wrong?

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
Calculating time for 3rd shift [email protected] Excel Worksheet Functions 4 October 25th 12 07:54 PM
Formula for shift schedule & calculating future dates - 2003 paankadu Excel Discussion (Misc queries) 0 June 11th 08 02:53 AM
How 2 use right shift "<<" and left shift "" operator in excel? v-2ajpau Excel Programming 2 December 28th 05 02:33 PM
Calculating recurring date in following month, calculating # days in that period Walterius Excel Worksheet Functions 6 June 4th 05 11:21 PM
CALCULATING WORKSHEETS (INCLUDING AGE CALCULATING SHEETS) FOR DOWNLOADING, GREAT FOR PENSIONS/LIFE INSURANCE CALCULATIONS! RICHARD Excel Programming 0 March 15th 05 02:41 PM


All times are GMT +1. The time now is 04:58 PM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017