In Excel, we can do a lot of things with our spreadsheet. We can put the dates in our spreadsheet and extract days, months, and years from the dates. In this article, we will see different ways to extract the month from the date in Excel.
We can extract a month from a given date in many ways. To do this, we are going to use the dataset below. The following dataset contains some Product IDs, Sales, and Date severally in columns B, C, D. Now we want to extract the months from the Date column. So, let’s demonstrate the ways to extract the month from the date.
1. Using Custom Formatting to Bring out Month From Date
To extract the month from a date, we can change the date format using custom formatting. For this, we need to go along with the steps below.
STEPS:
- First, select the date column from where we need to extract the month.
- Then, just right-click and select Format Cells. This will open up the Format Cells dialog box.
- Next, from the Number menu, go to Custom and type “mmmm”. Then click OK.
- Finally, the selected cell will now only show the months.
Read More: How to Extract Year from Date in Excel (3 Ways)
2. Withdrawing Month From Date Using TEXT Function
There are some built-in functions in Excel. With those functions, we can perform a variety of activities. Excel TEXT function is one of the useful functions. By this function, we can extract the months of dates. In the same token, we are using the following dataset. But now we will see the result in another column E. So, let’s take a view of the steps down.
STEPS:
- In the first place, select cell E5. And, write down the formula below.
=TEXT(D5,"mmmm")
As we take the date from D5, after writing ‘=TEXT’ select the cell D5 where we want to take the date from. Then just put down “mmmm” to show the month.
- Next, drag the Fill Handle over the range E6:E10.
- In the end, we can see the result which shows only the month in column E.
Read More: How to Extract Data from Excel Based on Criteria (5 Ways)
3. Applying the CHOOSE Function to Extract Month From Date in Excel
The CHOOSE function will also help to withdraw the month from a date. Again we use the same dataset. As shown in the previous method, we will see the result in another column E. We name the column month as we want to see only months in that column. We also need the MONTH function to take the number of months. The steps to extract the month from the date column are given below.
STEPS:
- In the beginning, select cell E5 and write down the formula below, and hit Enter.
=CHOOSE(MONTH(D5),"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
The MONTH function will help us to take the month number from a date. So, we put the MONTH function inside the CHOOSE function and sequentially write the short month name.
- Now, likewise, the previous method, drag the Fill Handle down.
- As a result, now, we can view the short month name in the Month column.
Read More: How to Extract Data From Table Based on Multiple Criteria in Excel
Similar Readings
- How to Convert Notepad to Excel with Columns (5 Methods)
- How to Extract Data from Image into Excel (With Quick Steps)
- Extract Filtered Data in Excel to Another Sheet (4 Methods)
- How to Extract Data from Excel to Word (4 Ways)
- Return Multiple Values in Excel Based on Single Criteria (3 Options)
4. Utilizing Excel SWITCH Function to Pull Out the Month from Date
Another function to extract a month from a date is the SWITCH function. We can get the number of the month with the MONTH function. After that, we will switch the month name by the month numbers. So, let’s take a view of the steps.
We are using the same dataset as before.
STEPS:
- First, select the cell where we want the result. So, we select cell E5.
- Next, write down the formula below.
=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.
The formula we use the MONTH(D5) which is inside the SWITCH function will give the number of months. Then, it will swap the numbers of the months to the names of the months.
- Further, drag the Fill Handle down.
- And, finally, we can view the result in the month column.
Read More: How to Pull Data From Another Sheet Based on Criteria in Excel
5. Using Power Query to Extract Month from Date
If we need to extract the months from a date, the power query is another way to do this. Let’s demonstrate how we use the power query to extract the months from the date.
STEPS:
- First, select the whole dataset. Then, go to the Data tab on the ribbon.
- Second, from the Data tab menu, go to From Table/Range.
- This will appear in the Create Table dialog box.
- Next, click on the OK button.
- This will open up the Power Query Editor.
- Now, we want to extract the month from the date column. So, we select the date column and right-click.
- Next, go to Transform.
- Then, put the mouse on Month.
- After that, click on Name of Month.
- On the other hand, we can also use the formula below.
= Table.TransformColumns(#"Changed Type", {{"Date", each Date.MonthName(_), type text}})
The above formula will take the month name from each date.
- Finally, press Enter. And, we can now view our desired result.
Read More: How to Extract Specific Data from a Cell in Excel (3 Examples)
Download Practice Workbook
You can download the workbook and practice with them.
Conclusion
The above examples assist you to extract the month from the date in Excel. Hope this will help you! If you have any questions, suggestions, or feedback please let us know in the comment section. Or you can have a glance at our other articles in the ExcelDemy.com blog!
Related Articles
- VBA Code to Convert Text File to Excel (7 Methods)
- How to Import Text File with Multiple Delimiters into Excel (3 Methods)
- How to Convert Text File to Excel Automatically (3 Suitable Ways)
- Import Data from Secure Website to Excel (With Quick Steps)
- How to Convert Excel to Text File with Pipe Delimiter (2 Ways)
- How to Import Data into Excel from Web (with Quick Steps)