ExcelNovicePLEASEHELP2541
New Member
- Joined
- Jul 28, 2020
- Messages
- 2
- Office Version
- 365
- Platform
- MacOS
Hello,
I'm hoping someone can help me with a bit of code.
I have a workbook made up of employee timesheets. One worksheet per employee. I also have one sheet named 'data' which is the full list of employee names and hours which will be copied from our rostering software.
The employees with timesheets changes every pay cycle so currently cell D4 on each timesheet has a formula in it to pull the employee name from the relevant cells in the 'data sheet'.
=Data!B2
=Data!B3
=Data!B4 ...and so on.
I want to only have timesheets that need to be processed in each pay cycle workbook document, rather than having a whole bunch of blank worksheets saved with a sheet for every employee, so it needs to be dynamic.
What I would like is for the sheet name to generate based on the name in D4 on each sheet (which is the name pulled from the 'data' sheet with the formula)
I can adjust where the data on the 'data sheet' sits to ensure cell D4 contains the name for this sheet too.
Through google I have gleaned a very basic understanding of how to use the VBA to put in the code and run the macro, but all the examples of code I found online (including in this forum) didn't work for my specific requirements. Some just didn't do anything and others identified as having bugs. I have no idea how to correctly write the code myself so I'm hoping someone can please help me out!
I'm hoping someone can help me with a bit of code.
I have a workbook made up of employee timesheets. One worksheet per employee. I also have one sheet named 'data' which is the full list of employee names and hours which will be copied from our rostering software.
The employees with timesheets changes every pay cycle so currently cell D4 on each timesheet has a formula in it to pull the employee name from the relevant cells in the 'data sheet'.
=Data!B2
=Data!B3
=Data!B4 ...and so on.
I want to only have timesheets that need to be processed in each pay cycle workbook document, rather than having a whole bunch of blank worksheets saved with a sheet for every employee, so it needs to be dynamic.
What I would like is for the sheet name to generate based on the name in D4 on each sheet (which is the name pulled from the 'data' sheet with the formula)
I can adjust where the data on the 'data sheet' sits to ensure cell D4 contains the name for this sheet too.
Through google I have gleaned a very basic understanding of how to use the VBA to put in the code and run the macro, but all the examples of code I found online (including in this forum) didn't work for my specific requirements. Some just didn't do anything and others identified as having bugs. I have no idea how to correctly write the code myself so I'm hoping someone can please help me out!