Question : Excel chart question - multiple charts

I have data in Excel such as this:

        Test1  Test2  Test3
Jim     95       100     92
John    87        93     90
Joe     72        88     23

I want to create and print graphs.  I want a separate bar graph for each student.  Test1, Test2, Test3 should appear along the bottom.  0 to 100 should appear along the left side.

How can I do this using Excel?  I can do it to create 1 graph for 1 student.  How can I print a graph for each student without manually creating each one?

I am using Excel 2003.

Thanks,
Chris

Answer : Excel chart question - multiple charts


I Uploaded an updated file with a PrintAll macro at this link:

http://www.ee-stuff.com/Expert/Upload/getFile.php?fid=5754

... employing the following code:

Sub PrintAll()
' PrintAll Macro

    Dim i As Long
    Dim iRows As Long
    Dim currentStudent As Range
    Application.Goto Reference:="R2C1"
    ActiveCell.Select
    Set currentStudent = Cells(2, 1)
    Range("A65536").Select
    Selection.End(xlUp).Select
    iRows = ActiveCell.Row

    For i = 3 To iRows

        currentStudent.Value = Cells(i, 1)
        ActiveSheet.ChartObjects("Chart 1").Activate
        ActiveChart.ChartArea.Select
        ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
        Windows("Test Score.xls").Activate
        Range("A2").Select

    Next

End Sub

Jeff
Random Solutions  
 
programming4us programming4us