Tables and X Y Scatter Charts

sherriwatkins

New Member
Joined
Jun 10, 2015
Messages
10
I need some help! I am usually really fluent in all things Excel, but this has me stumped. I have a table with over 1350 rows of data. I am trying to create an XY scatter chart that will allow me to chart only the information that has been sorted in the table. This table has 6 sets of data for the Y and 6 sets of data for the X axis. Y is the power and X is the flow (see below). I know I can manually selecteach row to put in the chart but is there a way to have Excel do this for me since there is so much data? I need to beable to create a master scatter chart that will take my raw data and as Ifilter rows out, will automatically adjust the chart. I hope this makes sense.

ManufacturerModel NumberDateTypeStagePressureHPFlowPower
ACG3611/20/13A110250240.0220.0150.0100.050.030.021.0020.0019.0019.0025.0027.00
ACG371/16/14A211550235.0220.0150.0100.045.035.021.0021.0019.0019.0024.0025.00
BCM231/16/14W112550225.0215.0150.095.035.030.022.0021.0020.0020.0026.0026.00
BCM247/16/14W210240205.0185.0150.095.040.030.019.0018.0018.0017.0021.0022.00
<colgroup><col width="92" style="width: 69pt; mso-width-source: userset; mso-width-alt: 3364;"> <col width="102" style="width: 77pt; mso-width-source: userset; mso-width-alt: 3730;"> <col width="61" style="width: 46pt; mso-width-source: userset; mso-width-alt: 2230;"> <col width="37" style="width: 28pt; mso-width-source: userset; mso-width-alt: 1353;"> <col width="40" style="width: 30pt;"> <col width="61" style="width: 46pt; mso-width-source: userset; mso-width-alt: 2230;"> <col width="40" style="width: 30pt;" span="13"> <tbody> </tbody>

Thanks,
Sherri

 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi Sherri

If you filter a chart’s source table or manually hide some rows, the corresponding data disappears from the chart. Does this solve your problem?
For a more refined approach, we can use VBA.
Note that the maximum number of data series per chart is 255.
 
Upvote 0
@ Worf Thanks, Is there an easy way to add the data to the chart rather than one at a time? Since there are over 1300 rows of data in this one file (I have 4 others), it would take months to enter each row into the chart.

Thanks!
Sherri
 
Upvote 0
This can be automated with VBA. The code below adds only the filtered rows from the source table to the chart, what do you think?

Code:
[FONT=Courier New][SIZE=3][COLOR=#000000] 
Sub Sherri()
Dim t As ListObject, r As Range, i%, ch As ChartObject, j%
Set ch = ActiveSheet.ChartObjects("chart 1")                ' your chart name here
Set t = ActiveSheet.ListObjects("table3")                   ' your table name here
Set r = t.DataBodyRange.SpecialCells(xlCellTypeVisible)
Do While ch.Chart.SeriesCollection.Count > 0
    ch.Chart.SeriesCollection(ch.Chart.SeriesCollection.Count).Delete
Loop
ch.Chart.HasLegend = True
For i = 1 To r.Areas.Count
    For j = 1 To r.Areas(i).Rows.Count
        With ch.Chart.SeriesCollection.NewSeries
            .XValues = r.Areas(i).Rows(j).Cells(1, 8).Resize(1, 6)  ' columns H-M
            .Values = r.Areas(i).Rows(j).Cells(1, 14).Resize(1, 6)  ' columns N-S
            .Name = r.Areas(i).Rows(j).Cells(1, 2)
        End With
Next j, i
End Sub<strike></strike>
[/COLOR][/SIZE][/FONT]
<strike></strike>
 
Upvote 0

Forum statistics

Threads
1,215,172
Messages
6,123,447
Members
449,100
Latest member
sktz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top