Automatic Multiple Chart Creating

Satprakash_Arora

New member
Joined
Feb 21, 2012
Messages
2
Reaction score
0
Points
0
I want to create multiple charts from one source file....
I am attaching the sample file along with this thread. In that worksheet, I have created charts for first two persons manually. I have to create such charts for all other students as well.

Is there any way by which, I can create such charts automatically for everyone from the sheet.......

Thanks for all the suggestions in advance...
 

Attachments

  • result.xls
    38.5 KB · Views: 73

Bob Phillips

Super Moderator
Staff member
Joined
Mar 21, 2011
Messages
1,940
Reaction score
0
Points
36
Excel Version(s)
O365
Why not just filter column A by the name you want to look at. Pie charts tell you nothing that the data is not telling you already.
 

Satprakash_Arora

New member
Joined
Feb 21, 2012
Messages
2
Reaction score
0
Points
0
I can't do so, because I need to copy and paste all those pie charts into individual reports for every student present in that list......
 

Bob Phillips

Super Moderator
Staff member
Joined
Mar 21, 2011
Messages
1,940
Reaction score
0
Points
36
Excel Version(s)
O365
Why not just pivot the data, then split it with 'Show Report Filter Pages'?
 

rassten

New member
Joined
Feb 28, 2012
Messages
1
Reaction score
0
Points
0
Location
Copenhagen
Maybe with some vba

Code:
Sub A_test()
Application.ScreenUpdating = False
x = 3
LC = Cells(Rows.Count, 1).End(xlUp).Row
AcSheet = ActiveSheet.Name

For i = 2 To LC Step 1

    Range("a" & i, "d" & i).Select
    Charts.Add
    ActiveChart.SetSourceData Source:=Worksheets(AcSheet).Range("a" & i & ":" & "d" & i)
    ActiveChart.ChartType = xlPie
    ActiveChart.Location where:=xlLocationAsObject, Name:=AcSheet
    ActiveChart.SeriesCollection(1).XValues = Worksheets(AcSheet).Range("B1:D1")
    
    With ActiveChart.Parent
        .Top = Worksheets(AcSheet).Range("i" & x).Top
        .Left = Worksheets(AcSheet).Range("i" & x).Left
    End With
    
    x = x + 15

Next i
Application.ScreenUpdating = True
End Sub

Regards rassten
 
Top