I need to a simple report out of excel to basically show one row of data on
one page. For example; I'm looking at 50 cars (rows) with 20 criteris
(columns) and I want to print one page per car (row). Any ideas would be
helpful. Already downloaded Report Manager and took a look at pivot tablel;
but they dont seem to help.
Thanks, JJA
You could use a macro that hides the all the rows and then prints that row.
Then it goes to the next row and does the same.
Option Explicit
Sub testme01()
Dim FirstRow As Long
Dim LastRow As Long
Dim iRow As Long
With Worksheets(quot;sheet1quot;)
FirstRow = 2
LastRow = .Cells(.Rows.Count, quot;Aquot;).End(xlUp).Row
For iRow = FirstRow To LastRow
'hide all the rows
.Rows.Hidden = True
'do you need the header row printed?
.Rows(1).Hidden = False
.Rows(iRow).Hidden = False
.PrintOut Preview:=True
Next iRow
'unhide all the rows
.Rows.Hidden = False
End With
End Sub
I used column A to determine the number of rows to print. And I printed both
row 1 (always) and each row.
Just delete that .rows(1).hidden line if you don't want the headers.
If you're new to macros, you may want to read David McRitchie's intro at:
www.mvps.org/dmcritchie/excel/getstarted.htm
JJA wrote:
gt;
gt; I need to a simple report out of excel to basically show one row of data on
gt; one page. For example; I'm looking at 50 cars (rows) with 20 criteris
gt; (columns) and I want to print one page per car (row). Any ideas would be
gt; helpful. Already downloaded Report Manager and took a look at pivot tablel;
gt; but they dont seem to help.
gt;
gt; Thanks, JJA
--
Dave Peterson
- Mar 13 Thu 2008 20:43
Simple Excel report
close
全站熱搜
留言列表
發表留言