Results 1 to 9 of 9

VBA XYScatter chart with multiple variable series

Threaded View

  1. #1
    Registered User
    Join Date
    02-17-2022
    Location
    Spain
    MS-Off Ver
    365 MSO 64 bits
    Posts
    11

    Question VBA XYScatter chart with multiple variable series

    Hi, I am quite new to VBA and I have been watching tutorials and reading forums without any clear answer... here is my problem:

    I have a variable number of series (represented in columns side-by-side as) and each one contains a distinct x and y value.

    Also, for each serie there's a number variable of data, so in Series1 there're 100 full rows and Series2 88 full rows, and so on in other series.

    In order to get a graphical view of the location of each of the values I want to insert them all into a plot. I know it should be a xlXYScatter plot, but for me it would be ideal if all the values represented were equal in shape as is the case with xlBubble (although the z-dimensional value should be equal in all cases).

    I have managed to make the XYscatted plot with only one set of values, and I don't know how to add some more...
    Can it be programmed in such a way that it goes series by series (variable) and keeping always all the values represented with the same style?

    Private Sub CommandButton1_Click()
    Dim xrng As Range
    Dim yrng As Range
    
    Set xrng = Range("B2:B100")
    Set yrng = Range("C2:C100")
    
    Dim Chart1 As Chart
        Set Chart1 = Charts.Add
    
     With Chart1
            .ChartType = xlXYScatter
            .SeriesCollection.NewSeries
            .SeriesCollection(1).Name = "=""Values"""
            .SeriesCollection(1).XValues = xrng
            .SeriesCollection(1).Values = yrng
    
        End With
    
    End Sub
    Many thanks!

    Ramon
    Last edited by Ralar; 02-18-2022 at 09:14 AM. Reason: Solved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Last Date Label on X-Axis Not Showing on XYScatter Chart
    By bjm286 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-15-2021, 03:17 PM
  2. Replies: 2
    Last Post: 02-19-2017, 07:52 PM
  3. [SOLVED] Show labels on XYScatter Chart ?
    By HerryMarkowitz in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-24-2014, 11:52 PM
  4. Problem setting transparency by VBA in XYScatter chart
    By itbcvdw in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-20-2013, 08:32 AM
  5. Create XYScatter Chart
    By knightcloud in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-18-2011, 03:26 AM
  6. How to use a variable for a series in a Chart
    By fugima in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-26-2011, 05:41 AM
  7. problem with min scale property using xyscatter chart
    By sagarsourav in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 10-31-2007, 03:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1