Solved

loop print on an excel form and merge data from table to print on each record.

Posted on 2013-12-26
3
443 Views
Last Modified: 2013-12-26
Hi.  I have an attendance form in Excel that I print out every year.  Normally I print out about 300 copies of the form and then stick employee name labels on each hardcopy but I'm thinking there has to be an easier way.  

Cell P2 on my excel form has a space for the name.  All of the employee names are in a separate excel sheet.  Can anyone think of a way to pull the name from my excel table and insert into cell P2 on my form for each print of this form, printing just enough copies of the form as there are records in the employee name spreadsheet?  thanks
0
Comment
Question by:valmatic
3 Comments
 
LVL 1

Expert Comment

by:SolveEtCoagula07
ID: 39740474
Could you post a copy of your document?
0
 
LVL 49

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39740635
Hi

you could it like this

In a sheet calles Names you have the employee first names in ColA LastNames in ColB with a Header

The Sheet called Form will be filled with the Full Name Of Each Employee and printed

Sub Macro()
Sheets("Names").Activate
For Each c In Range(Range("A2"), Range("A" & Cells.Rows.Count).End(xlUp))
    FullName = c & " " & c.Offset(0, 1)
    Sheets("Form").Range("P2").Formula = FullName
    Sheets("Form").PrintOut
Next
End Sub

Open in new window

Regards
0
 
LVL 7

Author Closing Comment

by:valmatic
ID: 39740808
I tweaked it a bit but that took me where I wanted to go.  thanks for the help.

:)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now