Solved

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

Posted on 2013-12-26
3
433 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 48

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

707 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

16 Experts available now in Live!

Get 1:1 Help Now