Hi all, You've been incredibly helpful and kind to this point, and I need to rely on that kindness one more time.
I need a macro that will check a certain cell for a value, and upon finding that value, cut the entire row and paste it into a different sheet, then delete the now-empty row from the sheet.
The main sheet is called 'Diversion Notes'.
In Column D there are cells between row 5 and 104 with a drop down which has the options "Select", "Diverted", and "Admitted".
I need a macro I can link to a button that when clicked, checks the cells between D5 and D104 on worksheet 'Diversion Notes'.
If "Select" is in the cell, do nothing.
If "Diverted" is in the cell, cut the entire row containing that cell, and paste in the sheet 'FYTD Diversions' in the next available row in that sheet, which has the exact same formatting (number of columns, column headers, etc. as the 'Diversion Notes' sheet). Like the initial sheet, data begins in row 5 when that sheet is blank. Then the macro should delete the now-empty row from 'Diversion Notes'.
If "Admitted" is in the cell, do the exact same thing but paste the row into the next available row in the sheet 'FYTD Admissions'.
I've seen code that can do this, but unfortunately I'm lost when it comes to where to change the sheet names, cells to check, etc. within the code. I've tried a couple of times and it hasn't worked or it's done something completely unintended.
I know it's a big ask. Thanks in advance!
I need a macro that will check a certain cell for a value, and upon finding that value, cut the entire row and paste it into a different sheet, then delete the now-empty row from the sheet.
The main sheet is called 'Diversion Notes'.
In Column D there are cells between row 5 and 104 with a drop down which has the options "Select", "Diverted", and "Admitted".
I need a macro I can link to a button that when clicked, checks the cells between D5 and D104 on worksheet 'Diversion Notes'.
If "Select" is in the cell, do nothing.
If "Diverted" is in the cell, cut the entire row containing that cell, and paste in the sheet 'FYTD Diversions' in the next available row in that sheet, which has the exact same formatting (number of columns, column headers, etc. as the 'Diversion Notes' sheet). Like the initial sheet, data begins in row 5 when that sheet is blank. Then the macro should delete the now-empty row from 'Diversion Notes'.
If "Admitted" is in the cell, do the exact same thing but paste the row into the next available row in the sheet 'FYTD Admissions'.
I've seen code that can do this, but unfortunately I'm lost when it comes to where to change the sheet names, cells to check, etc. within the code. I've tried a couple of times and it hasn't worked or it's done something completely unintended.
I know it's a big ask. Thanks in advance!