Excel 365 MSO XY chart errors when a longer X data column ends with empty cell and adjacent to other data

Aaron Boyce 0 Reputation points
2025-09-23T21:58:51.6866667+00:00

In an Excel spreadsheet, I have a table with multiple series of data for some XY scatter charts; some series have more data points than others. I noticed my series with the longest data set was getting its X-values replaced with ordinal values as a count of each data point. Answers online suggested a bad data type, but my cells were all general or number, both cases still caused the error.

To support plotting of multiple data sets, the chart data range extended beyond the last data point of the longest series. Note, the error only occurred when a table/chart had mixed length series data sets, and did not occur on the bottom table in my spreadsheet even with mixed lengths.

I copied the data from two tables to a simple new workbook/sheet, made a new chart and did not see the problem. That is when I realized the new chart series ranges stopped on row 18, which is the last data point on the longest series. I extended to row 19 and still did not see the problem.

(see the attached; this form won't allow .xlsx workbooks, try with the .pdf files:

failing case 2025-09-22_xychart_err.pdf

good case 2025-09-22_xychart_ok.pdf )

But, when I extended the chart data range to row 20 the problem came back; note row 20 is the last empty row before new data for the table below starting on row 21.

Even with the range going to row 20, I can get the chart to display correctly if I repeat the last X-value data in the longest series (column I) down to row 20.

Can you verify if there is a fix for this bug?

Version:

Microsoft® Excel® for Microsoft 365 MSO (Version 2508 Build 16.0.19127.20192) 64-bit

2025-09-22_xychart_err.pdf

getting: "We encountered an unexpected error." when trying to post...

Microsoft 365 and Office | Excel | For business | Android
{count} votes

1 answer

Sort by: Most helpful
  1. Hendrix-C 8,560 Reputation points Microsoft External Staff Moderator
    2025-09-23T23:27:20.66+00:00

    Hi @Aaron Boyce

    Thank you for posting your question in the Microsoft Q&A forum.  

    Let us conclude this situation based on your sharing: 

    • In your file, when the chart data range extended to row 20, Excel replaced X-values with ordinal values for the longest series. 
    • When the range stopped at row 18 or 19, the chart behaved correctly. 
    • You can repeat the last X-value in the longest series down to row 20 made Excel run properly.  

    This behavior is highly an expected behavior based on how Excel interprets the X-values range when it includes blank cells: 

    • In XY Scatter charts, Excel expects a 1:1 mapping between X-values and Y-values for each series. 
    • If the X-range is longer than the Y-range, or contains blanks, Excel may ignore the X-range entirely and fall back to ordinal numbers (1, 2, 3, …). 

    That's why it happened in your situation. When you extended the X-range to row 20, Excel saw extra blank cells in the X-range of the longest series. Since the Y-range only had values up to row 18, Excel couldn’t match X and Y values properly. When you repeated the last X-value down to row 20, Excel saw valid X-values for all Y-values even if some Y-values were blank or missing, so it stopped falling back to ordinal mode. 

    However, we want to thank you for raising this concern. I’ve shared your feedback internally, and I’d also recommend submitting it directly through the Microsoft Feedback Portal so it can be reviewed and prioritized by the product team.    

    User's image

    As moderators in the community, please be aware and accept that we are not responsible for the design of the product and that we have limited resources for detailed information about Microsoft products. We help guide users to the appropriate channels but do not influence product design decisions. 

    Thank you again for your patience and for bringing this to our attention. While we cannot change the product’s design directly, we’re here to support you and will continue to assist however we can. Please let us know if the steps above help resolve the issue or if further assistance is needed.  

    Wishing you a great day ahead.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.