Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Chris
 
Posts: n/a
Default Print data in each row on a seperate sheet template

In Access, you can create a form which views data from each row of the
database. When you print it automatically cycles through each row, printing
out identical sheets with just the data changing. Is it possible to do this
in excel without transferring the data to Access?
  #2   Report Post  
Damon Longworth
 
Posts: n/a
Default

You could put a page break at each row.

--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"Chris" wrote in message
...
In Access, you can create a form which views data from each row of the
database. When you print it automatically cycles through each row,
printing
out identical sheets with just the data changing. Is it possible to do
this
in excel without transferring the data to Access?



  #3   Report Post  
Chris
 
Posts: n/a
Default

Apologies, I should have qualified my question mo

I have a sheet with a table of data. I have another sheet with an A4
template of a page design that I want printed - with company logos etc and I
want printed one page from the template for each row of data. Is it possible
for me to automate the creation of the printouts from the table and template,
within excel?

"Damon Longworth" wrote:

You could put a page break at each row.

--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"Chris" wrote in message
...
In Access, you can create a form which views data from each row of the
database. When you print it automatically cycles through each row,
printing
out identical sheets with just the data changing. Is it possible to do
this
in excel without transferring the data to Access?




  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default

First, you could have used your excel table as the source and created the form
in MSWord (where you might have been able to make a nicer form???).

You may want to read some tips for mailmerge.
http://www.mvps.org/dmcritchie/excel/mailmerg.htm
http://www.mvps.org/word/FAQs/MailMerge

The first is from David McRitchie and the second is by Beth Melton and Dave
Rado.

======
But you can do what you want in excel (since your form is done).

But one thing I would do is add a new column A to your data. Use that as an
indicator that this row should be printed--if something happens and you have to
reprint a few, there's no sense printing all the forms.

This is the code I used:

Option Explicit
Option Base 0
Sub testme()
Dim FormWks As Worksheet
Dim DataWks As Worksheet
Dim myRng As Range
Dim myCell As Range
Dim iCtr As Long
Dim myAddresses As Variant

Set FormWks = Worksheets("form")
Set DataWks = Worksheets("data")

myAddresses = Array("b2", "c3", "d6", "F12")

With DataWks
Set myRng = .Range("b2", .Cells(.Rows.Count, "B").End(xlUp))
End With

For Each myCell In myRng.Cells
With myCell
If IsEmpty(.Offset(0, -1)) Then
'do nothing
Else
.Offset(0, -1).ClearContents 'for the next time
For iCtr = LBound(myAddresses) To UBound(myAddresses)
FormWks.Range(myAddresses(iCtr)).Value _
= myCell.Offset(0, iCtr).Value
Next iCtr
Application.Calculate 'just in case
FormWks.PrintOut preview:=True
End If
End With
Next myCell
End Sub

You'll want to change these lines:

Set FormWks = Worksheets("form")
Set DataWks = Worksheets("data")

myAddresses = Array("b2", "b3", "g6", "F12")

To match your workbook.

Since I used column A as the indicator, this will put the value in column B in
B2, column C in B3, D in G6 and E in F12. Just keep adding more addresses--but
go in that natural order (left to right starting in column B).

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm




Chris wrote:

Apologies, I should have qualified my question mo

I have a sheet with a table of data. I have another sheet with an A4
template of a page design that I want printed - with company logos etc and I
want printed one page from the template for each row of data. Is it possible
for me to automate the creation of the printouts from the table and template,
within excel?

"Damon Longworth" wrote:

You could put a page break at each row.

--
Damon Longworth

Don't miss out on the 2005 Excel User Conference
Sept 16th and 17th
Stockyards Hotel - Ft. Worth, Texas
www.ExcelUserConference.com


"Chris" wrote in message
...
In Access, you can create a form which views data from each row of the
database. When you print it automatically cycles through each row,
printing
out identical sheets with just the data changing. Is it possible to do
this
in excel without transferring the data to Access?





--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Excel Data from One Sheet to Another.... Robin Excel Discussion (Misc queries) 2 April 21st 05 01:15 PM
Multiple worksheet queries liam Excel Worksheet Functions 3 February 16th 05 06:52 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Automatic cell increment with data from sheet 1 to sheet 2 Big G Excel Worksheet Functions 2 December 20th 04 05:59 PM
getting data from 2 different exc sheet pinar Excel Worksheet Functions 1 November 9th 04 02:58 PM


All times are GMT +1. The time now is 02:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"