How to Change X-Axis Values in Excel (with Easy Steps)

Here is a dataset with the Profit of a company separated by Months that we will use to change X-axis values in Excel.

And here is the respective bar chart of the dataset above. We want to replace the Month by the serial number of respective months and see the chart only for Odd serial numbers.


Step 1 – Open the Source Data Selection Panel

  • Select the X-axis of the bar chart and right-click on it.
  • Click on Select Data.

Step-by-Step Procedures to Change X-Axis Values in Excel

  • After clicking on Select Data, the Select Data Source dialogue box will appear.

Read More: How to Change Data Source in Excel Chart


Step 2 – Selection of New Data to Change X-Axis Values

  • On the Select Data Source panel, click on Edit.

Step-by-Step Procedures to Change X-Axis Values in Excel

  • A data selection box called Axis Labels will appear.

  • In a separate column, type the month’s respective numbers serially and select the data.
  • Press OK.

Step-by-Step Procedures to Change X-Axis Values in Excel

  • The horizontal axis data has been replaced in the Select Data Source panel like this.

Step-by-Step Procedures to Change X-Axis Values in Excel

Read More: How to Change Chart Data Range in Excel


Step 3 – Modify Data for Changing X-Axis Values in Excel

To modify data or filter data according to our need, we can select or deselect which data to show on the plot from the Horizontal (Category) Axis Labels option.

For our case, we need to show only the Odd serial number’s data. So we’ll deselect the Even numbers from the list like in the image below.

Step-by-Step Procedures to Change X-Axis Values in Excel

Read More: How to Edit Chart Data in Excel


Step 4 – Exit Select Source Data Panel

  • Exit the Select Data Source panel by pressing OK.
  • We can see our bar chart having data of only Odd serial number months like below.

This how we change the X-axis values in Excel.

Read More: How to Change Chart Data Range Automatically in Excel


Changing Intervals to Change X-Axis Values in Excel

Case 1. On Text/Number Based X-Axis Values

Consider our first dataset and bar chart again. Let’s say we want to see the Month’s name with 3 intervals in between. For example, if we want to see January, then the next label should be April.

Steps:

  • Double-click on the X-axis to bring out the Format Axis option.
  • Find Labels. Here, the intervals are by default selected Automatically.

Changing X-Axis Intervals in Excel

  • For our case, we want the interval to be 3. Select Specify interval unit, set it to 3, and press Enter.

Changing X-Axis Intervals in Excel

  • After confirming, we will have a graph like below.

Read More: How to Skip Data Points in an Excel Graph


Case 2 – On Date Based X-Axis Values

To get our expected result for Date type data, consider the below dataset. It shows the Profit of any store from May 1 to May 7.

Also, we have a bar chart of the given dataset in the following image.

Steps:

  • Double-click on the X axis to enable Format Axis. Here we will see a bunch of extra options for date-specific data.

Changing X-Axis Intervals in Excel

  • Since our unit is in Days, set the Major to 3 and press Enter.

Changing X-Axis Intervals in Excel

  • We’ll have our previous bar chart in the following form.


Things to Remember

  • While replacing our X-axis values in the mentioned process, we need to make sure our new replacing values are the same in number as the previous values.
  • Changing Interval will not remove the rest of the columns having no label. If we want to do so, we will have to follow the previous method.
  • For Date type data we need to carefully look at the Interval Unit. For units in Days, if we select Months, we will get the wrong output.

Download Practice Workbook

You can download the practice workbook from here.


Related Articles


<< Go Back to Edit Chart Data | Excel Chart DataExcel Charts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Nasir Muhammad Munim
Nasir Muhammad Munim

Nasir Muhammad Munim has been an Excel and VBA Content Developer for over a year in Exceldemy and published more than 30 articles for the website. He is passionate about exploring new aspects of Excel and VBA. He received his Bachelor of Science in Electrical and Electronic Engineering from the Islamic University of Technology. Apart from creating Excel tutorials, he is interested in developing PostgreSQL, MySQL, and Android applications. He is fascinated by CAD-based designing systems and building... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo