Chart & Visualization Issues

Exclude Unwanted Dates from an Excel Online Line Chart X-Axis

Bushra ParveenBushra Parveen Nov 14, 2026 869 views

Question details

Show only the intended dates on an Excel Online line chart's horizontal axis.

Exclude Unwanted Dates from an Excel Online Line Chart X-Axis
Product
Excel Online
Device & OS
not provided
Scenario
A user creates a line chart from dated data and wants to omit dates such as weekends.
Observed behavior
The chart displays unwanted dates on the horizontal axis, including dates that may not be present in the source data.
Before you start

Check whether the unwanted dates are actual rows in the chart's source data or gaps added by a continuous date axis. Make sure the dates you want to plot are in chronological order.

Solution 1Recommended

Use text labels to show only the dates in the source data

Use this method when Excel adds dates, such as weekends, that are not in the source data.

A date axis can fill calendar gaps between data points. Text labels make the chart treat the supplied dates as categories instead.

1
Create a label column

Add a column next to the values you want to chart. If the first date is in A2, enter =TEXT(A2,"mmm d, yyyy") in the first label cell and fill the formula down.

2
Select the chart data

Select the text-label column and the corresponding value column, including their headers. Exclude the original date column from the selection.

3
Create the line chart

Choose Insert > Line Chart and select a line chart style. Check that the horizontal axis uses the text labels and shows only the selected dates.

Use text labels to show only the dates in the source data
Spacing between dates: Text categories are spaced evenly, so the chart will not represent the actual length of gaps between dates.
WPS Spreadsheet

Create a line chart with only the dates you select in WPS Spreadsheet

Use text labels in WPS Spreadsheet to create a line chart that treats your selected dates as categories instead of filling calendar gaps.

  1. 1. Open your workbook: Open WPS Spreadsheet and choose Open to select your Excel workbook.
  2. 2. Make text date labels: In a column next to your chart values, enter =TEXT(A2,"mmm d, yyyy"), replacing A2 with the first date cell. Fill the formula down for the remaining dates.
  3. 3. Select labels and values: Select the text-label column and the corresponding value column, including their headers.
  4. 4. Insert a line chart: Choose Insert > Chart, select a line chart, and check that the horizontal axis shows the selected text labels.
Show selected date labels without automatically adding weekend datesOpen and edit Microsoft Excel XLSX filesCreate line charts from worksheet dataUse a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does my chart show weekends when my data has no weekend rows?

A date axis can display calendar dates between the first and last data points. Use text date labels or change the axis to Text axis in desktop Excel's Format Axis pane.

Will hiding rows remove dates that Excel adds automatically?

No. Hiding rows can exclude data stored in those rows, but it does not remove dates inserted to fill gaps on a date axis. Use text labels or a text axis for those gaps.

Why are hidden rows still plotted in my chart?

The chart may be set to show data in hidden rows or columns. Open the workbook in desktop Excel and check the chart's Select Data > Hidden and Empty Cells settings.

Does a text axis preserve the actual time gaps between dates?

No. A text axis spaces categories evenly. Keep a date axis if the distance between points needs to reflect elapsed time.