Determining AM or PM Shift Question
I there a way to determine if an employee works an AM or PM shift based on the following text? There are appox. 67 different schedules.
4/40 Sunday - Wednesday 8:00 PM - 6:30 AM 30 Min Lunch
4/40 Sunday - Wednesday 6:00 AM - 4:30 PM 30 Min Lunch
There are appox. 67 different schedules.
Thank you!
Ron
Best Answer
-
There is also a misplaced parenthesis.
=IF(OR(AND(FIND("AM",[Shift]@row)<FIND("PM",[Shift]@row),FIND("AM",[Shift]@row)<>0), FIND("PM", [Shift]@row)=0),"AM","PM")
Answers
-
Hi,
Assuming all you would need is whether the start time is in the AM to determine this, you could use a formula like this in a column:
- IF(OR(AND(FIND("AM",[Shift]@row)<FIND("PM",[Shift]@row),FIND("AM",[Shift]@row<>0)), FIND("PM")=0),"AM","PM")
I hope this helps!
Best,
Zach Hall
Training Delivery Manager / Charter Communications
-
Thank you Zach for your assistance. I am receiving an Incorrect Argument Error. Here is a screen shot to help.
-
Sorry! I missed a necessary field there:
- IF(OR(AND(FIND("AM",[Shift]@row)<FIND("PM",[Shift]@row),FIND("AM",[Shift]@row<>0)), FIND("PM", [Shift]@row)=0),"AM","PM")
Best,
Zach Hall
Training Delivery Manager / Charter Communications
-
There is also a misplaced parenthesis.
=IF(OR(AND(FIND("AM",[Shift]@row)<FIND("PM",[Shift]@row),FIND("AM",[Shift]@row)<>0), FIND("PM", [Shift]@row)=0),"AM","PM")
-
It is working properly now. Thank you both for your assistance.
Ron
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!