How to Plot an Excel Chart by Month and Year (2 Examples)

Below is a dataset for the Monthly Sales Quantity of 6 months, consisting of Date and Sales columns.

Monthly Sales Quantity to Create Chart by Month and Year

Method 1 – Using a Single Legend Entry

Steps:

  • Create two columns named Year and Month between the Date and Sales columns.

Insert Two New Columns

  • Click on cell C5 and enter the following formula:
=YEAR(B5)

Use the YEAR Function to Create Chart by Month and Year

  • Press Enter.
  • Place your cursor in the bottom right of the cell and drag the fill handle downward.

Drag the Fill Handle to Copy Formula

  • Click cell D5 and enter the following formula to extract the month of the following date.
=TEXT(B5,"mmm")

Use the TEXT Function to Create Chart by Month and Year

  • Press Enter.
  • Place your cursor at the bottom right of this cell. When the fill handle appears, drag it below to copy the same formula.

Drag Fill Handle to Copy Formula

  • Select cells C5:E10.
  • Go to the Insert tab >> Insert Line or Area Chart tool >> Line option.

Insert Line Chart to cReate Excel Chart by Month and Year

  • A line chart will appear based on the sales data, keeping the month and year on the X-axis.

Excel Chart by Month and Year

  • For a cleaner look, click on the chart >> click on the Chart Elements icon >> untick the Gridlines option.

Customize the Chart Elements

  • For a better understanding of the chart, double-click on the Chart Title and write Sales Quantity Per Month.

Edit Chart Title

There will be an Excel chart with months and years according to your data. The outcome should look like this.

Excel Chart by Month and Year

Read More: How to Combine Daily and Monthly Data in Excel Chart


Method 2 – Adding a Secondary Axis to an Excel Chart by Month and Year

Steps:

  • Select cells B5:C10 >> go to the Insert tab >> Insert Line or Area Chart tool >> Line option.

Insert a Chart to Create Chart by Month and Year

  • You will have a line chart for the selected data range.

Line Chart

  • For a simplified look, click on the Chart >> Chart Elements icon >> Untick the Gridlines option.

Customize the Chart Elements to Create Chart by Month and Year

  • For a better understanding of the chart, double-click on the Chart Title and enter Sales Quantity Per Month.

Edit the Chart Title

Your chart will look like this.

Excel Chart by Dates

  • The X-axis has dates, but you want only the month and number. Now, double-click on the X-axis.

Access the X-axis

  • The Format Axis pane window will appear on the right side. At the Axis Options group, mark the Axis Type as Automatically select based on data.
  •  Enter 10/1/2021 at the Minimum Bound and the last data’s date at the Maximum Bound. Keep the Units as 1 month for both Major and Minor axes.

Format the X-axis to Create Chart by Month and Year

  • Create two columns named Month & Year and Helper Column.

Create Two New Columns to Create Excel Chart by Month and Year

  • In the Month & Year column, copy and paste all the given dates.
  • Enter 0 in the Helper Column cells.

Fill the New Columns

  • Select the cells of the Month & Year column and right-click.
  • Select the Format Cells option from the context menu.

Format Cells of the Dates

  • The Format Cells window will appear. Select the Category: as Date and the Type: as Mar-12.
  • Click OK.

Fix the Date Format

  • You will see the dates are in month and year.

New Formatted Dates

  • Go to the chart again. Right-click on the chart area and choose the Select Data option from the context menu.

Access the Select Data Source Window

  • The Select Data Source window will appear. Click on the Add button.

Add New Series

  • The Edit Series window will appear. In the Series values: text box, refer to the F5:F10 cells.
  • Click OK.

Refer the New Series Data

  • You will be back at the Select Data Source window again. Click OK.

Finalize the Entries of the Chart to Create Chart by Month and Year

  • Another data series is added to the chart – the orange line.

Chart with New Series

  • Double-click on the blue line. The Format Data Series task pane will arrive on the right side.
  • Under the Format Data Series task pane, go to the Series Options group.
  • Under the Plot Series On options, click on the Secondary Axis option.

Access the Sales Series

You will have a chart like the following figure.

Chart with New Axis

  • Right-click on the chart area again and select the Select Data option from the context menu.

Access the Select Data Source Window

  • The Select Data Source window will appear.
  • Select the Series 2 entry and click the Edit button under the Horizontal Axis Labels option.

Edit Series 2 Values to Create Chart by Month and Area

  • The Axis Labels window will appear. At the Axis label range, select the E5:E10 cells.
  • Click OK.

Edit the Value Range of the Series 2 Entry

  • The Select Data Source window will appear again. Click OK.

Finalize the Edit to Create Chart by Month and Year

  • The chart will now look like this.

Edited Chart

  • Select the chart >> go to the Chart Design tab >> Add Chart Element tool >> Axes options >> Secondary Horizontal option.

Add Secndary Axis to Create Chart by Month and Year

You will have a chart with two horizontal axes.

Chart with two Horizontal Axes

You don’t need the orange line anymore.

  • Double-click on the orange line. The Format Data Series task pane will appear on the right side.
  • Under the Series Options group, go to the Fill & Line group.
  • Under the Line group, select the No line option.

Access the Series 2 Line Series Options

  • The orange line is gone.

Chart without Orange Line

You don’t need the left vertical axis anymore.

  • select it and press the Delete button.

Delete Left Vertical Axis

  • The chart will now look like this.

Chart with One Vertical Axis on Right

  • To move the right vertical axis to the left, double-click on the upper horizontal axis. The Format Axis task pane will appear on the right side.
  • Go to the Axis Options group >> Vertical axis crosses option >> Select the At date option >> Enter the date as 10/1/2021 inside the text box.

Fix the Cross Position of Two Axes

  • Double-click on the vertical axis and go to the Axis Options group.
  • Enter the minimum bound as 0.0 inside the Minimum text box under the Bounds group.

Fix Bounds of Vertical Axis to Create Chart by Month and Year

  • Remove the upper horizontal axis, and double-click on the axis. The Format Axis task pane will appear.
  • Go to the Axis Options group >> Labels group >>  Label Position option >> choose the option as None.

Remove the Upper Horizontal Axis Label

  • Go to the Fill & Line group from the Axis Options group >> Fill group >> No line option >> Line group >> No line option

Remove the Upper Horizontal Axis Line to Create Chart by Month and Year

You have created an Excel chart by month and year. It should look like this.

Excel Chart by Month and Year

Read More: How to Create Graph from List of Dates in Excel


Download the Practice Workbook

You can download our practice workbook from here for free.


Related Articles


<< Go Back to Data for Excel ChartsExcel Charts | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Tanjim Reza
Tanjim Reza

Md. Tanjim Reza Tanim, a BUET graduate in Naval Architecture & Marine Engineering, contributed over one and a half years to the ExcelDemy project. As an Excel & VBA Content Developer, he authored 100+ articles and, as Team Leader, reviewed 150+ articles. Tanim, leading research, ensures top-notch content on MS Excel features, formulas, solutions, tips, and tricks. His expertise spans Microsoft Office Suites, Automating Finance Templates, VBA, Python, and Developing Excel Applications, showcasing a multifaceted commitment to the... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo