Using Slicer to Filter data on Scatter Chart

Neelia

New Member
Joined
Jul 22, 2016
Messages
3
I have been using slicers in order to filter the data that I have displayed on a scatter chart. I was wondering if it was possible that when selecting multiple selections in the slicer, the different selections would show up on the scatter chart in different colours/markers.

Or is there a different way to easily filter data? I cannot use pivot charts as I need the data in a scatter graph and I cannot put each selection as a different series as there is more than what is allowed on one graph.


Thanks!
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Welcome to the Board


  • Newer Excel versions have chart filters as shown on the picture below. What’s your version?
  • Is your chart source data a real table? Are the slicers connected to this table? Please give more details on the data layout and setup. A link to your workbook would be ideal, with sensitive data removed.
  • VBA code can be written to manipulate the chart elements, if you require a personalized solution based on the current slicer selections.


chfilters.JPG
 
Upvote 0
Hi Worf,

Apologies, I do not know how to send a link to my workbook.

Basically I have an XY Scatter, lets say the data is dimensions in the X and Y axis. I would like to then compare these dimensions for each month say. If I select July on the slicer then only July data is shown. But if I select July and August then both months are shown however they are the same series so I cannot distinguish between the two months. My data is in a table format.

Thank you for your help
 
Upvote 0
To share a file, you must upload it to a site like Drop Box and paste a link here.
See if this helps; clicking one button makes all markers the same colour, clicking the other one applies month based colour code.

Code:
' sheet module
Private Sub CommandButton3_Click()  ' all markers the same
Me.ChartObjects("Chart 8").Chart.SeriesCollection(1).MarkerBackgroundColor = RGB(230, 5, 10)
End Sub


Private Sub CommandButton4_Click()  ' color code by month
Dim s As Series, xv, i%, r%, g%, b%
Set s = Me.ChartObjects("Chart 8").Chart.SeriesCollection(1)    ' the first series
xv = s.XValues
For i = LBound(xv) To UBound(xv)
    Select Case Month(xv(i))
        Case 1: r = 35: g = 98: b = 156
        Case 2: r = 178: g = 65: b = 32
        Case 3: r = 213: g = 167: b = 218
        Case 4: r = 134: g = 95: b = 31
        Case 5: r = 21: g = 6: b = 218
        Case 6: r = 178: g = 217: b = 97
        Case 7: r = 145: g = 174: b = 175
        Case 8: r = 176: g = 5: b = 132
        Case 9: r = 6: g = 111: b = 96
        Case 10: r = 76: g = 214: b = 112
        Case 11: r = 79: g = 89: b = 65
        Case 12: r = 167: g = 112: b = 223
    End Select
    s.Points(i).Format.Fill.ForeColor.RGB = RGB(r, g, b)
Next
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,395
Members
449,081
Latest member
JAMES KECULAH

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