Macro to create a new tab based on an existing tab

M

Maypop

I have a spreadsheet that is effectively a payroll document it has a main
table with a line for each employee and a tab for each employee which are the
payslips and the information feeds from the main table into the tabs, I need
to create a macro that will add a new tab (for a new employee) based on the
last tab (scructure and functions) but move all the ref functions down one
row in the main table, meaning it will pull the details of the latest person
added to the spreadsheet. If anyone can provide any insight it would be
greatfully recieved.
 
J

Joel

the first thing I would do is have a blank templet sheet that I would copy
for each new employee. When adding new rows in the summary sheet I would
copy the last employee and insert a new line above the last employee. Thsi
is done so if there arre any total rows at the bottom the formulas for the
totals will be automatically changed when the row is added. I would then
highlight the entire row for the new employee and use REPLACE to change the
sheet name from the old employee to the new employee.

I described the actions as if you would manually do the operations put the
same thing can be done in a macro.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top