Merge Data into Excel

M

MistyLou

I have seen other posts about this, but still cannot get my employee names
onto Timesheets.
The excel sheet I am trying to get the information into is called Work
Schedule. The employee names are in an excel sheet titled PayrollListGlobe.
I am trying to write the formula into C4 on the Workschedule. The employee
names are in A1 thru A-96 on the PayrollListGlobe.
I need to merge the employee name into the timesheet and
print to give to each employee.
 
O

Otto Moehrbach

Misty
Do you want to get just one employee name into C4? Which one? Or do
you want to loop through all the names and place each into C4 and print in
turn? If the latter, what other information from PayrollListGlobe do you
want placed into WorkSchedule along with the name? And once all the info is
placed for one name, what range do you want printed? HTH Otto
 
M

MistyLou

I need one name to go onto the timesheet and then print it. Basically I will
need 96 timesheets printed, each with a different name once I am done. The
name is the only field I need inserted into the timesheet. Everything else
is there that I need. Right now the lady doing timesheets types the names
onto each one, front and back side. It's taking her a full day with 150
employees within 4 locations. I am trying to make it as time efficient for
her as possible.

Thank you!!!!!
 
O

Otto Moehrbach

Misty
This macro will take each name in Column A of the PayRollListGlobe sheet
from A1 to the last entry in Column A, place it in C4 of the WorkSchedule
sheet, and will print range A1:D34 of the WorkSchedule sheet for each name.
Note that the code is dumb and will do exactly what it is told. Note
the names of the 2 sheets as they appear in this macro. The 2 pertinent
sheets in your file MUST have exactly the same names. Change these names in
this macro as needed. Also note the range that will be printed. As
written, this macro will print A1:D34. Change this as needed. Place this
macro in a standard module and run it when you wish. If you are new to
macros and if you wish, send me your file or a sample of your file and I
will place this macro where it's needed. I can also add a button in the
PayRollListGlobe sheet with which to run this macro. Include whatever
changes you want made to this macro. My email address is
(e-mail address removed). Remove the "extra" from this email address.
HTH Otto
Sub PrintTimeShts()
Dim ListOfNames As Range
Dim i As Range
Dim WhatToPrint As Range
Sheets("PayRollListGlobe").Select
Set WhatToPrint = Sheets("WorkSchedule").Range("A1:D34")
Set ListOfNames = Range("A1", Range("A" & Rows.Count).End(xlUp))
For Each i In ListOfNames
With Sheets("WorkSchedule")
.Range("C4") = i.Value
WhatToPrint.PrintOut
End With
Next i
End Sub
 

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