The following dataset contains some Product IDs, Sales, and Dates in columns B, C, and D. We want to extract the months from the Date column.
Method 1 – Using Custom Formatting to Extract the Month from a Date
STEPS:
- Select the date column from where you need to extract the month.
- Right-click and select Format Cells. This will open the Format Cells dialog box.
- From the Number menu, go to Custom and type “mmmm”.
- Click OK.
- The selected cells will now only show the months.
Read More: How to Extract Year from Date in Excel
Method 2 – Getting the Month from a Date with the TEXT Function
We’ll get the result in a separate column E.
STEPS:
- Select cell E5.
- Insert the following formula:
=TEXT(D5,"mmmm")
- Drag the Fill Handle over the range E6:E10.
- We can see the result which shows only the months in column E.
Read More: How to Extract Data Based on Criteria from Excel
Method 3 – Applying the CHOOSE Function to Extract the Month from a Date in Excel
As in the previous method, we will get the result in another column E.
STEPS:
- Select cell E5 and insert the formula below, then hit Enter.
=CHOOSE(MONTH(D5),"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
The MONTH function will retrieve the month number from the date. CHOOSE then returns the corresponding value from the array list.
- Drag the Fill Handle down.
- Here are the results.
Read More: How to Extract Specific Data from a Cell in Excel
Method 4 – Utilizing the SWITCH Function to Get the Month from a Date
We are using the same dataset as before.
STEPS:
- Select the cell where we want the result. We selected cell E5.
- Insert the following formula:
=SWITCH(MONTH(D5),1,"January",2,"February",3,"March",4,"April",5,"May",6,"June",7,July",8,"August",9,"September",10,"October",11,"November",12,"December")
- Press Enter.
- Drag the Fill Handle down.
- Here’s the result in the Month column.
Read More: How to Extract Month and Day from Date in Excel
Method 5 – Using Power Query to Extract Months from Dates
STEPS:
- Select the whole dataset.
- Go to the Data tab on the ribbon.
- Go to From Table/Range.
- You’ll get the Create Table dialog box.
- Click on the OK button.
- This will open the Power Query Editor.
- Select the date column and right-click.
- Go to Transform.
- Choose Month.
- Click on Name of Month.
- Alternatively, use the formula below.
= Table.TransformColumns(#"Changed Type", {{"Date", each Date.MonthName(_), type text}})
- Press Enter.
- Select Close & Load.
Download the Practice Workbook
Related Articles
- Excel Formula to Get First 3 Characters from a Cell
- How to Extract Data from Cell in Excel
- How to Extract Data from Excel Sheet
- How to Extract Data From Table Based on Multiple Criteria in Excel
- How to Extract Data from a List Using Excel Formula
<< Go Back To Extract Data Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!