HELP PLEASE! Looking to create a "Mandatory Overtime" list that rotates after the employee is held for a shift.

DevinB

New Member
Joined
Apr 25, 2022
Messages
3
Office Version
  1. 365
  2. 2021
  3. 2016
  4. 2013
  5. 2007
  6. 2003 or older
Platform
  1. Windows
Hello. I am new to the forum. I have spent about a week looking for answers and trying to solve this issue on my own. I am fairly well-versed with Excel... more so than a "general user"; however, I have little experience with coding and VBA.

I have attached a mini-sheet of my list; it's pretty basic.

There are only 2 columns that I am concerned with that will need some type of conditional sorting and/or formatting... the Employee and Date Held columns. The third column is irrelevant since the employee will rotate to the bottom of the list whether they are held on overtime or volunteer for overtime.

As you can see the Employee list is in alphabetical order. This is our starting point for this new way of handling mandatory overtime.

When an employee on the list is held for overtime, the date they are held is entered into the column next to their name. When that date is entered, I need them to rotate to the bottom of the list. Thus having the next alphabetical (A-Z) employee that has not been held (no date beside their name) at the top of the list.

Sure, I can use the "sort" feature in the date column, but I want the employees that have a date beside their name grouped at the bottom of the list in an order that reflects the oldest held (by date) at the top of that group.

Once every person has been held or volunteered to work and subsequently has a date beside their name, I can just sort the Date Held column. But I have users that may not know (or remember) to manually sort the list before they print and post the list. I'd like that to be automatic.

If anyone can help, I'd be greatly appreciative. I know this may be complex, but I'm willing to work with whoever can help.

Sample Overtime List.xlsx
ABCDEF
1Mandatory Overtime List
2ALSBLS
3EmployeeDate HeldHeld or VoluntaryEmployeeDate HeldHeld or Voluntary
4Bob, JoeBob, Joe
5Cat, BobCat, Bob
6Dog, HotDog, Hot
7Edward, JohnEdward, John
8Flint, BillFlint, Bill
9Hill, JimHill, Jim
10Jameson, JonJameson, Jon
11King, TomKing, Tom
12Moon, LeahMoon, Leah
13North, JillNorth, Jill
14Oscar, JeanOscar, Jean
15Papa, BigPapa, Big
16Red, JohnRed, John
17Smith, TracySmith, Tracy
18White, MisterWhite, Mister
MOT List
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Perhaps enter a bogus date in the past to start with for each person (e.g. 01/01/2000) and sort by date Oldest to Newest and then by employee A to Z? Then alter the date for employee when they work OT. If code isn't used then I guess you'd have to apply the sort after each entry. Not sure if you'd need to split left and right groups onto separate sheets or not.
 
Upvote 0
Solution
Micron:

Thanks for that information! That does help add to my thought process.

Do you know of a way to add a "button" or some other way to sort automatically on "update" after an entry is made and the enter key is pressed?
 
Upvote 0
You could use the macro recorder and go through the sort process to create some code. Then you can assign a keyboard combination to run it. If you prefer, after creating the code you could cut and paste it into a button click event (don't copy the Sub and End Sub parts though). The macro recorder can teach you a few things about coding if you're not adept at vba.
 
Upvote 0
You could use the macro recorder and go through the sort process to create some code. Then you can assign a keyboard combination to run it. If you prefer, after creating the code you could cut and paste it into a button click event (don't copy the Sub and End Sub parts though). The macro recorder can teach you a few things about coding if you're not adept at vba.

Ok, great. Thank you for all the information! I will reach out if I have any other questions.
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

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