Chart & Visualization Issues

How to Automatically Color XY Scatter Chart Points by Cost in Excel

Steve KSteve K Oct 23, 2026 870 views

Question details

The user wants to conditionally color XY scatter chart data points based on specific criteria like cost quartiles, without relying on VBA macros.

How to Automatically Color XY Scatter Chart Points by Cost in Excel
Product
Excel
Device & OS
not provided
Scenario
Creating an XY scatter chart to map project importance and visually categorize them by their respective cost categories.
Observed behavior
The user needs a dynamic, formula-based method to automatically assign distinct colors to scatter chart markers corresponding to their assigned cost group.
Before you start

Ensure your source data is organized in a clear tabular format, with X values, Y values, and the conditional metric (e.g., cost) in adjacent columns before creating the chart.

Solution 1Recommended

Use Helper Columns to Create Separate Data Series

The most effective way to conditionally color scatter plot points without VBA is to divide your single dataset into multiple chart series using helper columns, assigning a unique marker color to each series.

Excel does not have a built-in 'Conditional Formatting' button for chart data points. However, by using the IF function combined with NA(), you can conditionally route Y-values into separate columns based on their cost quartile. A scatter chart can then plot these separate columns as distinct series with individual colors.

1
Set up helper columns

Next to your main X and Y data columns, add a new column for each cost quartile or category you want to display (e.g., Q1, Q2, Q3, Q4).

2
Apply IF and NA() formulas

In the first cell of your Q1 helper column, enter a formula similar to =IF(CostCell<=Threshold1, Y_ValueCell, NA()). The NA() function outputs an #N/A error for values outside the category, which forces the chart to ignore that cell instead of plotting a zero.

3
Populate remaining categories

Adjust the IF conditions for the Q2, Q3, and Q4 columns so that each Y-value only appears in one helper column based on its cost. Drag the formulas down to fill the entire dataset.

4
Insert the scatter chart

Highlight your X-values column and all of your new helper columns (hold Ctrl to select non-adjacent columns if necessary). Go to the Insert tab, click the Scatter Chart icon, and select 'Scatter with only Markers'.

5
Format series marker colors

Your chart will now plot the different quartiles as separate series. Double-click any data point in a series to open the Format Data Series pane. Go to Marker > Fill, and choose your preferred color. Repeat this step for each quartile series.

Use Helper Columns to Create Separate Data Series
Dynamic Updates: Because this method relies on formulas, changing a project's cost in your raw data will automatically shift its Y-value to a different helper column, instantly updating the marker's color on the chart.
WPS Spreadsheet Chart Solutions

Build and Customize Scatter Charts Easily with WPS Spreadsheet

WPS Spreadsheet offers powerful charting capabilities that let you map project data on X/Y axes effortlessly. You can perfectly replicate the helper-column technique for dynamic conditional formatting, giving you full control over your data visualization without needing macros.

  1. 1. Prepare your data in WPS Spreadsheet: Open your dataset and set up your helper columns using the IF and NA() functions to categorize your Y values by cost.
  2. 2. Create the chart: Navigate to the Insert tab, click the Scatter Chart icon, and select a blank scatter plot.
  3. 3. Add your data series: Right-click the blank chart area, choose 'Select Data', and manually add each helper column as a new series, using your original X-values for the horizontal axis.
  4. 4. Customize marker colors: Double-click the chart markers to open the formatting pane on the right side of the screen, then assign distinct colors to each series.
Free and lightweight spreadsheet toolFully compatible with Microsoft Excel (.xlsx) formatsAdvanced charting features with fully customizable markersSupports complex logical functions like IF and NA() for dynamic charts
QA img-9

Frequently Asked Questions

Why use NA() instead of blank "" or 0 in the helper column?

In scatter charts, a 0 will plot as an actual data point at the zero value on the Y-axis, and a blank "" may cause text plotting errors or drop the line to zero. The NA() function returns an #N/A error, which Excel natively ignores, leaving that specific point empty on the chart.

Can I use standard Conditional Formatting directly on scatter chart points?

No, Excel does not support built-in Conditional Formatting rules directly applied to chart data points. The helper column and multi-series method is the standard workaround to achieve dynamic coloring without using complex VBA programming.

How do I calculate the cost quartiles for my chart?

You can use the QUARTILE.INC() or QUARTILE.EXC() functions in an empty cell to determine the exact quartile thresholds of your entire cost column. You can then reference these threshold cells as absolute references (e.g., $F$2) in your helper column's IF formulas.