# Determining AM or PM Shift Question

Options
✭✭✭✭

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

• ✭✭✭✭✭✭
Options

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")

• ✭✭✭✭✭✭
Options

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

• ✭✭✭✭
Options

Thank you Zach for your assistance. I am receiving an Incorrect Argument Error. Here is a screen shot to help.

• ✭✭✭✭✭✭
Options

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

• ✭✭✭✭✭✭
Options

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")

• ✭✭✭✭
Options

It is working properly now. Thank you both for your assistance.

Ron

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!