Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default print column labels with one row of data at a time.

You may want to write a macro to do this. I'm new to VB so am
cross-posting this in microsoft.public.excel.programming.


"gooba937" wrote in message
...
I am a teacher. I have created my gradebook in excel. (I don't have
access). I have 7 worksheets (one for each class that I teach). The
worksheets are not exactly the same.

I would like to be able to print out the top two rows (column labels) with
each students data (row). This way the student can see row 1 (name of
assignment), row 2 (points), their row (their personal data for each
assignment).

Any help??



  #2   Report Post  
Posted to microsoft.public.excel.newusers,microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default print column labels with one row of data at a time.

Sub PrintData()
Dim sh As Worksheet, rng As Range
Dim numcols As Long
Dim cell As Range
For Each sh In ActiveWorkbook.Worksheets
sh.Activate
Set rng = sh.Range(sh.Cells(3, 1), _
sh.Cells(3, 1).End(xlDown))
numcols = sh.Cells(1, 256).End(xlToLeft).Column
sh.PageSetup.PrintArea = rng.Resize(, _
numcols).Address(1, 1, xlA1, True)
sh.PageSetup.PrintTitleRows = _
sh.Rows(1).Resize(2).Address(1, 1, xlA1, True)
sh.PageSetup.Orientation = xlLandscape ' or xlPortrait
rng.EntireRow.Hidden = True
For Each cell In rng
If cell.Row < 3 Then
cell.Offset(-1, 0).EntireRow.Hidden = True
End If
cell.EntireRow.Hidden = False
sh.PrintPreview
Next
rng.EntireRow.Hidden = False
Next
End Sub

--
Regards,
Tom Ogilvy



"Barb Reinhardt" wrote in message
...
You may want to write a macro to do this. I'm new to VB so am
cross-posting this in microsoft.public.excel.programming.


"gooba937" wrote in message
...
I am a teacher. I have created my gradebook in excel. (I don't have
access). I have 7 worksheets (one for each class that I teach). The
worksheets are not exactly the same.

I would like to be able to print out the top two rows (column labels)

with
each students data (row). This way the student can see row 1 (name of
assignment), row 2 (points), their row (their personal data for each
assignment).

Any help??





  #3   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel.newusers
Naz Naz is offline
external usenet poster
 
Posts: 85
Default print column labels with one row of data at a time.

Other than writing a macro you have two other options

1) Use MS Word and do a mailmerge using your Excel list as the soource
2) Create a simple form in Excel as follow

Assume you have your sheet set up as follows

A B C D E
1 1 Name Project1 Project2
2 2 John 75% 85%
3 3 mark 65% 25%
4 4 Lisa 55% 78%
5 5 Rahul 80% 68%


I have added the numbers in colum B.
On a new sheet setup the first rows (labels) as you want them, in cell A1
put 1
then beneath them where you want the data enter this formula

= Vlookup(A1,Sheet1!A$1$:$E$5,2,false)
from the example above this will return the name of the student, in the next
cell if you enter the same formula but replace the 2 with 3 it will return
the result for project 1, a 4 will return the result for project 2.

changing the 1 in cell A1 to 2 will return the data for the student 2 and
so on.
You could add a scroll bar and link it to A1 to make it more sophisticated.

Of course you would need to change the above to suit your needs, but should
do what you need.

If you need any further help post back.

--

_______________________
Naz,
London


"Barb Reinhardt" wrote:

You may want to write a macro to do this. I'm new to VB so am
cross-posting this in microsoft.public.excel.programming.


"gooba937" wrote in message
...
I am a teacher. I have created my gradebook in excel. (I don't have
access). I have 7 worksheets (one for each class that I teach). The
worksheets are not exactly the same.

I would like to be able to print out the top two rows (column labels) with
each students data (row). This way the student can see row 1 (name of
assignment), row 2 (points), their row (their personal data for each
assignment).

Any help??




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
can't print data labels - on screen but don't print out Linda Charts and Charting in Excel 1 June 27th 09 07:11 PM
Data labels print with white background [email protected] Charts and Charting in Excel 2 May 7th 08 12:57 PM
how do I freeze my column labels so that they print every page? canefish Excel Discussion (Misc queries) 1 June 1st 07 05:04 PM
print column labels with one row of data at a time. gooba937 New Users to Excel 8 November 8th 05 12:36 AM
Converted data to labels. The 0 in zip codes does not print Judy New Users to Excel 2 February 2nd 05 03:33 AM


All times are GMT +1. The time now is 08:15 AM.

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

About Us

"It's about Microsoft Excel"