Hello,
I'm having trouble making a graph which requires me to do a union range where I want the data to be from a specific cell and cover all the data underneath it, in this same column.
I would appreciate any help
Code:
Sub CreateChartDigital()
Dim ch As Chart
Sheet1.Select
Union( _
Range("A1").End(xlDown)), _
Range("N1").End(xlDown)), _
Range("S1").End(xlDown)), _
Range("AS1").End(xlDown))).Select
Charts.Add2
Set ch = Charts.Add2
ch.ChartType = xlLine
ch.HasLegend = True
ch.HasTitle = True
ch.ChartTitle.Text = "Digital Data"
ch.Axes(xlCategory).HasTitle = True
ch.Axes(xlCategory).AxisTitle.Text = "Time (ms)"
ch.Axes(xlValue).HasTitle = True
ch.Axes(xlValue).AxisTitle.Text = "Pressure (mbar)"
I'm having trouble making a graph which requires me to do a union range where I want the data to be from a specific cell and cover all the data underneath it, in this same column.
I would appreciate any help
Code:
Sub CreateChartDigital()
Dim ch As Chart
Sheet1.Select
Union( _
Range("A1").End(xlDown)), _
Range("N1").End(xlDown)), _
Range("S1").End(xlDown)), _
Range("AS1").End(xlDown))).Select
Charts.Add2
Set ch = Charts.Add2
ch.ChartType = xlLine
ch.HasLegend = True
ch.HasTitle = True
ch.ChartTitle.Text = "Digital Data"
ch.Axes(xlCategory).HasTitle = True
ch.Axes(xlCategory).AxisTitle.Text = "Time (ms)"
ch.Axes(xlValue).HasTitle = True
ch.Axes(xlValue).AxisTitle.Text = "Pressure (mbar)"