YEAR + MONTH (period key) Function in Excel: Syntax, Examples and Free Practice
YEAR + MONTH (period key) is an Excel Date & Time function. Combines YEAR and MONTH into a single sortable text label like '2026-03' for grouping data by month.
YEAR + MONTH (period key) syntax
Arguments
date_cell: The date to extract from
When to use YEAR + MONTH (period key)
Creating a clean 'Year-Month' grouping key to summarize sales by month in a pivot table.
Practice YEAR + MONTH (period key) online, free
Open the live Excel-style spreadsheet and try YEAR + MONTH (period key) yourself. No Excel install or sign-up needed to start.
Practice YEAR + MONTH (period key) now →More Date & Time functions
Frequently asked questions
What does the YEAR + MONTH (period key) function do in Excel?
Combines YEAR and MONTH into a single sortable text label like '2026-03' for grouping data by month.
What is the syntax of YEAR + MONTH (period key) in Excel?
The syntax is =YEAR(date_cell)&"-"&TEXT(MONTH(date_cell),"00"). date_cell: The date to extract from.
Where can I practice YEAR + MONTH (period key) online for free?
Open the free live spreadsheet on Cellgrids and try YEAR + MONTH (period key) yourself. No Excel install is needed and you can start without signing up.
All Excel formulas · Cheat sheet · Excel exercises · Date and Time functions · Excel case studies · Excel tutorials · Excel shortcuts