
The `MONTH` function in Excel is used to extract the month from a given date. It returns the month as an integer ranging from 1 (January) to 12 (December). Here’s how you can use the `MONTH` function:
Syntax
MONTH(serial_number)
- serial_number: This is the date from which you want to extract the month. It can be a reference to a cell containing a date, a date entered using the `DATE` function, or text in a valid date format.
Examples
=MONTH(A1)
=MONTH(DATE(2022, 12, 15))
=MONTH("12/15/2022")
- Extracting Month from a Date in a Cell
- Suppose you have the date `12/15/2022` in cell A1. To extract the month:
- This formula will return `12`, representing December.
- Extracting Month from a Date Entered Directly
- You can use the `MONTH` function with a date entered directly in a formula:
- This will also return `12`.
- Extracting Month from a Text Date
- If your date is stored as text in the format `MM/DD/YYYY`, you can still use the function:
- This should return `12`, assuming your system settings support this date format.
Notes
- Ensure the date passed to the `MONTH` function is recognizable as a valid date by Excel. If not, it may return errors.
- Excel may handle different date formats based on your system’s regional settings. Make sure your date formats align with the settings to avoid errors.
- If you use dates as text, be cautious with formats to ensure Excel interprets them correctly.
Using the `MONTH` function is straightforward and can be very useful in date calculations, report filtering, and summarizing data based on months.