Multi-Chart Dashboard

Create multiple charts on a single worksheet for comprehensive analysis

823 views
Featured

Perfect For:

  • Executive reporting
  • Data analysis
  • Performance dashboards
VBA Code
Sub CreateMultiChartDashboard()
    Dim ws As Worksheet
    Dim dashWs As Worksheet
    Dim chart1 As ChartObject, chart2 As ChartObject, chart3 As ChartObject

    Set ws = Sheets("Data") ' Assumes data is in a sheet named "Data"
    Set dashWs = Worksheets.Add
    dashWs.Name = "Dashboard_" & Format(Date, "mmyyyy")

    ' Chart 1: Column Chart
    Set chart1 = dashWs.ChartObjects.Add(50, 50, 300, 200)
    With chart1.Chart
        .SetSourceData ws.Range("A1:B10")
        .ChartType = xlColumnClustered
        .HasTitle = True
        .ChartTitle.Text = "Sales by Month"
    End With

    ' Chart 2: Pie Chart
    Set chart2 = dashWs.ChartObjects.Add(400, 50, 300, 200)
    With chart2.Chart
        .SetSourceData ws.Range("D1:E5")
        .ChartType = xlPie
        .HasTitle = True
        .ChartTitle.Text = "Product Mix"
    End With

    ' Chart 3: Line Chart
    Set chart3 = dashWs.ChartObjects.Add(225, 300, 300, 200)
    With chart3.Chart
        .SetSourceData ws.Range("A1:C10")
        .ChartType = xlLine
        .HasTitle = True
        .ChartTitle.Text = "Trend Analysis"
    End With

    MsgBox "Multi-chart dashboard created!"
End Sub

Related Topics

dashboard multiple charts analysis visualization

Need Custom VBA Solutions?

Our AI-powered VBA generator can create custom code tailored to your specific requirements in seconds.

Free AI generations every month — top up with credit packs anytime

Related Templates

More VBA templates in the same category

Intermediate

Dynamic Chart Creator

Create dynamic charts that update automatically with new data

View Template