Good Morning all,
I have a request for a code.
I have a list of 46 employees (a2:a46) that I would like to "rotate". If an employee works overtime, I will then enter a date on their corresponding F column and I would like their entire row to move all the way down on the list. The person on top of the list should be the next person to work overtime. For employee 1, his info is from a2 to f2 (and so forth). I would like a code that if I enter a date on F2, the entire a2 to f2 row would drop down to row a46:f46; thereby shifting all other entries one row up. For a just in case scenario, if employee 10 happened to work OT and I enter a date on f10, I would like him to move down to the bottom of the list as well.
On a separate question, I tried to record the macro of me entering the date on F2, cutting and pasting a2:f6 to a47; cutting and pasting a3:f47 to a2. Everything worked well as the entries shifted "up". However, how do I modify the macros so I can enter ANY date?
selectedSheet.getRange("F2").setValue("11/14/2024");
I have a request for a code.
I have a list of 46 employees (a2:a46) that I would like to "rotate". If an employee works overtime, I will then enter a date on their corresponding F column and I would like their entire row to move all the way down on the list. The person on top of the list should be the next person to work overtime. For employee 1, his info is from a2 to f2 (and so forth). I would like a code that if I enter a date on F2, the entire a2 to f2 row would drop down to row a46:f46; thereby shifting all other entries one row up. For a just in case scenario, if employee 10 happened to work OT and I enter a date on f10, I would like him to move down to the bottom of the list as well.
On a separate question, I tried to record the macro of me entering the date on F2, cutting and pasting a2:f6 to a47; cutting and pasting a3:f47 to a2. Everything worked well as the entries shifted "up". However, how do I modify the macros so I can enter ANY date?
selectedSheet.getRange("F2").setValue("11/14/2024");