ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Single record (https://www.excelbanter.com/excel-discussion-misc-queries/47041-single-record.html)

zigeuner

Single record
 

Is it possible to print a single record per page? I have a spreadsheet
with 240 records and I want to be able to print a single record per
page, preferably with the column headings vertically down the side. I
have only a short time (about 20 hrs) to acheive this. :(


--
zigeuner
------------------------------------------------------------------------
zigeuner's Profile: http://www.excelforum.com/member.php...o&userid=27527
View this thread: http://www.excelforum.com/showthread...hreadid=470476


Dave Peterson

How about a small macro to get you started:

Option Explicit
Sub testme()

Dim wks As Worksheet
Dim newWks As Worksheet
Dim iRow As Long
Dim FirstRow As Long
Dim LastRow As Long

Set wks = Worksheets("sheet1")
Set newWks = Worksheets.Add

With wks
FirstRow = 2 'headers in row 1
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

.Rows(1).Copy
newWks.Range("a1").PasteSpecial Transpose:=True

For iRow = FirstRow To LastRow
newWks.Range("b1").EntireColumn.ClearContents
.Rows(iRow).Copy
newWks.Range("b1").PasteSpecial Transpose:=True
With newWks
.UsedRange.Columns.AutoFit
.UsedRange.Rows.AutoFit
With .PageSetup
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintErrors = xlPrintErrorsDisplayed
End With
.PrintOut preview:=True
End With
Next iRow
End With

Application.DisplayAlerts = False
newWks.Delete
Application.DisplayAlerts = True

End Sub

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

zigeuner wrote:

Is it possible to print a single record per page? I have a spreadsheet
with 240 records and I want to be able to print a single record per
page, preferably with the column headings vertically down the side. I
have only a short time (about 20 hrs) to acheive this. :(

--
zigeuner
------------------------------------------------------------------------
zigeuner's Profile: http://www.excelforum.com/member.php...o&userid=27527
View this thread: http://www.excelforum.com/showthread...hreadid=470476


--

Dave Peterson

Dave Peterson

Ps. I use "preview:=true" to save paper. Get rid of that when you're ready to
kill a tree <bg.

zigeuner wrote:

Is it possible to print a single record per page? I have a spreadsheet
with 240 records and I want to be able to print a single record per
page, preferably with the column headings vertically down the side. I
have only a short time (about 20 hrs) to acheive this. :(

--
zigeuner
------------------------------------------------------------------------
zigeuner's Profile: http://www.excelforum.com/member.php...o&userid=27527
View this thread: http://www.excelforum.com/showthread...hreadid=470476


--

Dave Peterson

Earl Kiosterud

zigeuner,

When you say 240 records, I presume you mean 240 rows of data in a table
(sheet). Excel has no provision for changing the layout of a sheet. It
prints the sheet pretty much as is, with the perqs in File - Page setup.
But that won't take a single row at a time and spread it out on a page
vertically and horizontally, which I think you want.

Access can do this, and can use Excel data. That's a possibilty. Access is
terrific for laying out a printed report however you want it. You could
also lay it out in Word, and use mail merge.
--
Earl Kiosterud
www.smokeylake.com

"zigeuner" wrote in
message ...

Is it possible to print a single record per page? I have a spreadsheet
with 240 records and I want to be able to print a single record per
page, preferably with the column headings vertically down the side. I
have only a short time (about 20 hrs) to acheive this. :(


--
zigeuner
------------------------------------------------------------------------
zigeuner's Profile:
http://www.excelforum.com/member.php...o&userid=27527
View this thread: http://www.excelforum.com/showthread...hreadid=470476




zigeuner


Thank you Dave and Earl. I have no managed it using the transpose
function, albeit without the macro Dave (I have saved it though). Earl
the Access option wouldn't work as the spreadsheet had some functions
embedded in cells that Access could make no sense of. Brian


--
zigeuner
------------------------------------------------------------------------
zigeuner's Profile: http://www.excelforum.com/member.php...o&userid=27527
View this thread: http://www.excelforum.com/showthread...hreadid=470476


Dave Peterson

Does that mean you copy and paste special|transpose 240 times???

You may want to play with that macro to see if it works for you.

zigeuner wrote:

Thank you Dave and Earl. I have no managed it using the transpose
function, albeit without the macro Dave (I have saved it though). Earl
the Access option wouldn't work as the spreadsheet had some functions
embedded in cells that Access could make no sense of. Brian

--
zigeuner
------------------------------------------------------------------------
zigeuner's Profile: http://www.excelforum.com/member.php...o&userid=27527
View this thread: http://www.excelforum.com/showthread...hreadid=470476


--

Dave Peterson


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com