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
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!