Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Change Date to Month and Year in Excel: Easy Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To change a date to show only the month and year in Excel, select the cells, press Ctrl + 1 to open the Format Cells dialog, go to the Number tab, select Custom, and type "mmm-yyyy" or "mmmm yyyy" into the Type box. This method changes how the date looks without deleting the original day of the month, allowing you to still use the data for precise calculations.

Changing date formats is essential for creating clean reports, dashboards, and summaries. When you have a list of specific dates (e.g., 01/15/2023, 02/20/2023), it can be visually overwhelming. By condensing these to just the month and year, you make the data easier to read and group. Depending on whether you want to simply change the appearance or actually transform the data into a text string, you can use either Cell Formatting or the TEXT function.

What You'll Need

  • Microsoft Excel (any version)
  • A dataset containing valid Excel dates

Step-by-Step

Method 1: Using Custom Number Formatting (Visual Change Only)

This is the best method if you still need to perform calculations or sort your data chronologically, as Excel still "sees" the full date behind the scenes. Note that menu labels may differ slightly depending on your version of Excel or operating system.

  1. Select the cells: Click and drag to highlight the cells or columns containing the dates you want to change.
  2. Open Format Cells: Right-click the selected area and choose Format Cells... from the menu, or use the keyboard shortcut Ctrl + 1 (Cmd + 1 on Mac).
  3. Navigate to Custom: In the Format Cells window, ensure you are on the Number tab. In the Category list on the left, click Custom.
  4. Enter the Format Code: Locate the input box labeled Type:. Delete whatever is currently there and type one of the following codes based on your preference:
    • mmm-yyyy (Result: Jan-2023)
    • mmmm yyyy (Result: January 2023)
    • mm/yyyy (Result: 01/2023)
  5. Apply changes: Click OK. Your dates will now display only the month and year.

Method 2: Using the TEXT Function (Permanent Conversion)

Use this method if you need the date to be converted into a text string, which is useful for concatenating the date with other words or creating specific labels for a pivot table.

  1. Select a blank cell: Click in an empty cell next to your original date.
  2. Enter the formula: Type the following formula (assuming your date is in cell A2): =TEXT(A2, "mmmm yyyy")
  3. Press Enter: The cell will now display the month and year as text.
  4. Fill the column: Click the small green square (fill handle) at the bottom-right corner of the cell and drag it down to apply the formula to the rest of your list.

Common Mistakes

  • Typing dates as text: If you typed your dates as "January 2023" manually instead of entering a real date (like 1/1/2023), Excel treats them as text. Custom formatting will not work on text; it only works on numerical date values.
  • Confusing "m" and "mm": Using a single "m" in the custom code (e.g., m-yyyy) will display the month as a number without a leading zero (1, 2, 3), while "mm" ensures two digits (01, 02, 03).
  • Overwriting data: When using the TEXT function, remember that the result is a text string. If you try to sort these results, Excel will sort them alphabetically (April, August, December) rather than chronologically.

Tips

  • Quick Access: If you frequently use the same format, you can create a "Cell Style" from the Home tab so you can apply your month-year format with one click.
  • Sorting: If you use Method 1 (Custom Formatting), you can still sort your data from oldest to newest because the underlying value remains a full date.
  • Consistency: Always use the same format code throughout a single report to maintain a professional appearance and avoid confusing the reader.

Troubleshooting

The format didn't change

If you applied the custom format but the cell still looks the same, the date is likely stored as text. To fix this, select the cell, go to the Data tab, select Text to Columns, click Next twice, and in the "Column data format" section, select Date (choose the format that matches your original input, e.g., MDY). Click Finish, then try the formatting steps again.

The cell shows #VALUE!

This usually happens when using the TEXT function on a cell that doesn't actually contain a valid date. Check for typos, extra spaces, or non-date characters in the source cell.

The cell shows #####

This is not an error; it simply means the column is too narrow to display the full "January 2023" text. Double-click the right border of the column header to auto-fit the width.

Frequently Asked Questions

Can I change the date back to the full version?

Yes. If you used Method 1, simply go back to Format Cells > Number and select Date or choose a different custom format. If you used Method 2, you cannot "undo" it within that cell because the original date was replaced by a text string; you must refer back to the original source cell.

What is the difference between "mmm" and "mmmm"?

The number of "m"s determines the length of the month name. "mmm" produces a three-letter abbreviation (e.g., Jan, Feb, Mar), while "mmmm" produces the full name of the month (e.g., January, February, March).

How do I show only the month name without the year?

In the Custom format box, simply type mmmm. This will hide both the day and the year, displaying only the full name of the month.

Will this change the date in my calculations?

If you use Custom Number Formatting (Method 1), your calculations will not change. Excel still uses the full date (day, month, and year) for any math or formulas. If you use the TEXT function (Method 2), the result is text and cannot be used in date-based math without being converted back.

Can I use this for a Pivot Table?

Yes. While you can format the cells manually, Pivot Tables have a built-in "Group" feature. Right-click a date in a Pivot Table, select Group..., and choose Months and Years for an automatic summary.