Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Print multiple pages with different name.
I have set up a timesheet in excel that I would like to be able to print with
each employees name on it. Is there a way of doing this without creating a sheet for each employee. |
#2
|
|||
|
|||
Say you put the names of the employees on Sheet2 (a1:Axxx). And you want to
print Sheet1 (and the names go into C1). Then you could run a little macro to print: Option Explicit Sub testme01() Dim myCell As Range Dim myNamesRng As Range Dim myHeaderCell As Range With Worksheets("sheet2") Set myNamesRng = .Range("a1", .Cells(.Rows.Count, "A").End(xlUp)) End With With Worksheets("sheet1") Set myHeaderCell = .Range("C1") For Each myCell In myNamesRng.Cells myHeaderCell.Value = myCell.Value .PrintOut preview:=True Next myCell myHeaderCell.ClearContents End With End Sub (I used preview:=true to save paper while testing.) If you're new to macros, you may want to read David's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Annepaws wrote: I have set up a timesheet in excel that I would like to be able to print with each employees name on it. Is there a way of doing this without creating a sheet for each employee. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Print all charts in a workbook (multiple worksheets) | Charts and Charting in Excel | |||
print different row titles in one sheet w/ many pages | Excel Worksheet Functions | |||
Print multiple pages per Sheet in Excel 2003 | Excel Discussion (Misc queries) | |||
How do you set titles to print on multiple pages? | Excel Discussion (Misc queries) | |||
set the print area print multiple tabs | Excel Discussion (Misc queries) |