Dropdown List to automatically enter work shift

dinkss

Board Regular
Joined
Aug 25, 2020
Messages
129
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi there,

I'm new to VBA and Excel. I'm trying to write formula or VBA code to be able to get EXCEL to automatically enter WORK SHIFT based on time when data was selected from dropdown list.
I have created dropdown list but now I want EXCEL to enter WORK SHIFT automatically when I select any options from dropdown list no matter what time it will be. I want excel to know if I select data at 10:00:00 that this is Day Shift and if I select Data at 19:00:00 that this is Evening Shift.

My dropdown menu is in Cells J:J and I want excel to automatically enter work shift in K:K based on time when I select information from my dropdown list.

I have attached screenshot of my worksheet.

Please help me, it is really important for me!

Thanks Guys!
01.png
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
These are the shifts and times:
08:00:00 - 15:59:59Day Shift
16:00:00 - 23:59:59Evening Shift
00:00:00 - 07:59:59Night Shift
08:00:00 - 19:59:59Weekend-Days
20:00:00 - 07:59:59Weekend-Nights
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,628
Members
452,661
Latest member
Nonhle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top