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.5K Get Help
- 424 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 146 Just for fun
- 63 Community Job Board
- 465 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 301 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!