A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How do I set an EXCEL worksheet to print one row of data per page



 
 
Thread Tools Display Modes
  #1  
Old April 27th 07, 06:14 PM posted to microsoft.public.excel.misc
Carol
external usenet poster
 
Posts: 115
Default How do I set an EXCEL worksheet to print one row of data per page

Hi. I have entered the wonderful world of barcoding.

I want to create and print my barcodes in Excel. So far, I've been able to
do the create part with no problem.

Now, I need advice on how to set up my spreadsheet to AUTOMATICALLY print
one row of data per page. My spreadsheet has three columns of data:
Student ID number, Student ID number in BARCODE format, and Student Name.
So, each printed page will contain one student's data.

My worksheet will contain data for MANY students, so manually entering page
breaks is not an option.

Any help would be appreciated.
Ads
  #2  
Old April 27th 07, 06:54 PM posted to microsoft.public.excel.misc
Jim Cone
external usenet poster
 
Posts: 3,290
Default How do I set an EXCEL worksheet to print one row of data per page


Carol,
If you up to running a macro, select the columns you
want to print and run the following code...
'----------------------------
Sub PrintEachRow()
'06/30/2005 - Jim Cone - San Francisco, USA
'Prints each row in the selection - skips any blank rows.
Dim rngPrint As Excel.Range
Dim rngRow As Excel.Range
Set rngPrint = Application.Intersect(Selection, ActiveSheet.UsedRange)

If Not rngPrint Is Nothing Then
For Each rngRow In rngPrint.Rows
If Application.CountA(rngRow) > 0 Then
rngRow.PrintOut copies:=1
End If
Next
End If
Set rngPrint = Nothing
Set rngRow = Nothing
End Sub
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Carol" >
wrote in message
Hi. I have entered the wonderful world of barcoding.
I want to create and print my barcodes in Excel. So far, I've been able to
do the create part with no problem.
Now, I need advice on how to set up my spreadsheet to AUTOMATICALLY print
one row of data per page. My spreadsheet has three columns of data:
Student ID number, Student ID number in BARCODE format, and Student Name.
So, each printed page will contain one student's data.
My worksheet will contain data for MANY students, so manually entering page
breaks is not an option.
Any help would be appreciated.
  #3  
Old April 27th 07, 07:20 PM posted to microsoft.public.excel.misc
Dave Peterson
external usenet poster
 
Posts: 35,220
Default How do I set an EXCEL worksheet to print one row of data per page

I'd use a macro to insert the page breaks.

Option Explicit
Sub testme()
Dim iRow As Long
With Worksheets("sheet1")
.ResetAllPageBreaks
For iRow = 2 To .Cells(.Rows.Count, "A").End(xlUp).Row
.HPageBreaks.Add Befo=.Cells(iRow, "A")
Next iRow
End With
End Sub


Then you could set up the page layout to have row 1 to repeat at top (if
required). And print.



Carol wrote:
>
> Hi. I have entered the wonderful world of barcoding.
>
> I want to create and print my barcodes in Excel. So far, I've been able to
> do the create part with no problem.
>
> Now, I need advice on how to set up my spreadsheet to AUTOMATICALLY print
> one row of data per page. My spreadsheet has three columns of data:
> Student ID number, Student ID number in BARCODE format, and Student Name.
> So, each printed page will contain one student's data.
>
> My worksheet will contain data for MANY students, so manually entering page
> breaks is not an option.
>
> Any help would be appreciated.


--

Dave Peterson
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you print separate worksheet on a single page? LisaVH Excel Discussion (Misc queries) 3 November 2nd 06 08:17 PM
How do I print more than 1 worksheet on a page? Exploration101 Excel Discussion (Misc queries) 2 January 27th 06 03:52 PM
Different print page setups on one worksheet? tad Excel Worksheet Functions 1 January 11th 06 05:44 PM
Print other worksheet by changing a Letter/# on another page. Rob Excel Worksheet Functions 1 October 1st 05 06:16 PM
why would page 1 of an excel worksheet print smaller of page 2 if. hisdrama pest Excel Discussion (Misc queries) 1 January 10th 05 07:14 PM


All times are GMT +1. The time now is 07:45 AM.


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