Share via

Using a Macro to Create a Scatterplot in Excel. The X value of the points is actually consecutive numbering rather than the actual X values.

Anonymous
2024-01-31T02:44:31+00:00

I am using a Macro to generate 24 series on a graph automatically. The graph is not plotting the data correctly - the x values are just consecutive numbers rather than the actual unique X Values. I have tried and checked the data is in numbers not text.

When I select data, the correct numbers appear under horizontal (category) axis labels.

There are lots of blank cells in my data, but wherever there is an X value there is a corresponding Y value.

If I fill the blanks with random numbers for a series, then the graph works properly for that series only. When I delete the fake data it remains working.

I have tried displaying blanks as 0, gaps and no difference.

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2024-01-31T04:50:55+00:00

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-01-31T03:55:26+00:00

    My data is coming from the correct ranges yes I have checked this. I have attached 2 snippets of the excel. The data in Graph is coming from the Graph 3, X and Y sections below. Each colour designates a different series.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-01-31T03:37:58+00:00

    Right click the chart > Select data> check whether your series x value range is correct.

    Could you share us a screenshot of your issue?

    Was this answer helpful?

    0 comments No comments