Custom Formulas and Formatting to Display Only Month and Year in Excel

Dec 01, 2025 · Programming · 15 views · 7.8

Keywords: Excel | Date Formulas | Custom Formatting

Abstract: This article explores various methods in Excel to display only month and year, focusing on using the DATE function combined with YEAR and MONTH to generate sequential month series, and optimizing display with the custom format "YY-Mmm". It also compares other approaches like the TEXT function, providing complete steps and code examples to help users handle date data efficiently.

Introduction

When working with date data in Excel, users often need to display only the month and year, such as in financial reports or project plans. This can be achieved through formulas and formatting, avoiding errors and inefficiencies from manual entry. Based on the best answer from the Q&A data, this article delves into core methods and provides supplementary references.

Core Method: Generating Sequential Months with the DATE Function

The recommended method involves combining the DATE, YEAR, and MONTH functions. First, enter a start date in cell A1, e.g., 8/1/2013. Then, in adjacent cell B1, input the formula: =DATE(YEAR(A1),MONTH(A1)+1,1). This formula works by: the YEAR function extracts the year from A1, the MONTH function extracts the month and adds 1 to increment it, and the DATE function combines these parts into a new date with the day set to 1 for consistency. By dragging the formula to the right, it automatically generates a sequential month series, such as "13-Aug", "13-Sep", etc.

Custom Formatting: Displaying Only Month and Year

To display only month and year, apply a custom date format. In Excel, select the cell containing the date, right-click and choose "Format Cells", then under "Custom", enter YY-Mmm. In this format, "YY" represents a two-digit year, and "Mmm" represents the abbreviated month name (e.g., Aug). Thus, even if the cell stores a full date, it will show as "13-Aug". For example, if A1 contains 8/1/2013, applying this format displays "13-Aug".

Supplementary Method: Using the TEXT Function

Other answers mention using the TEXT function, e.g., the formula =TEXT(TODAY(),"MMYYYY"). This method converts the current date to text format "MMYYYY", but it is static and not suitable for generating sequential series. The TEXT function is better for one-time display of a specific date's month and year without dragging. However, for dynamic series scenarios, the DATE function method is more flexible.

Code Examples and Step-by-Step Instructions

Here is a complete example: Assume A1 has 8/1/2013 with the custom format YY-Mmm. In B1, enter the formula =DATE(YEAR(A1),MONTH(A1)+1,1), then drag B1 to L1 (11 cells total). This generates the series: "13-Aug", "13-Sep", "13-Oct", "13-Nov", "13-Dec", "14-Jan", "14-Feb", "14-Mar", "14-Apr", "14-May", "14-Jun". Note that the month increment in the formula automatically handles year transitions, resetting the month from December to January when the year changes from 2013 to 2014.

Conclusion and Best Practices

To display only month and year in Excel, the recommended approach is using the DATE function with custom formatting, as it supports dynamic series generation and format control. Key insights include: the DATE function for constructing dates, YEAR and MONTH functions for extracting and manipulating date parts, and the custom format "YY-Mmm" for display optimization. Avoid using the TEXT function for series unless static text output is required. By following these methods, users can efficiently manage date data and enhance productivity.

Copyright Notice: All rights in this article are reserved by the operators of DevGex. Reasonable sharing and citation are welcome; any reproduction, excerpting, or re-publication without prior permission is prohibited.