5 replies
by parier
=concatenate(sheet1!A1)
This will copy wherever you put it to wherever you reference it from, for example, if A1 on sheet was the first name, then enter this on sheet2, then only that person would be on sheet 2, and do so for each person, and save this as a template and next time you have data, you can just paste it onto sheet 1 and all other pages should link from that. if you need more info, send me something that you are workng with and I will show you and return the file.
Hope thishelps
Eric
by rdenyer
by peyison
To do this manually, you'd right click on the tab of a sheet, select "Move or Copy...", and in the "To Book" dropdown, select (new book).
The following macro code will automate the process of copying a sheet to a new workbook, saving it, and emailing it.
Sheets("Sheet1").Copy
ActiveWorkbook.SaveAs Filename:="C:\My Documents\JohnDoe.xls"
ActiveWorkbook.SendMail "JohnDoe@yahoo.com", "Payroll Info"
ActiveWorkbook.Close
You could put this in a loop to do this for all of the sheets in your workbook. If the sheet name was the employee's email address, you could loop through all sheets very easily with a loop like:
Sub PRLoop()
Dim oSheet As Worksheet
Dim sName As String
For Each oSheet In ActiveWorkbook.Sheets
sName = oSheet.Name
oSheet.Copy
ActiveWorkbook.SaveAs Filename:="C:\My Documents\" & sName & ".xls"
ActiveWorkbook.SendMail sName & "@YourCo.com", "Payroll Info"
ActiveWorkbook.Close
Next
End Sub
Hope this helps.
by rdenyer
by rdenyer
This discussion is closed to new replies.
Trending Software posts
Sort by Trending