Spreadsheettricks

How to extract a month name from a date using the excel Text function

Microsoft Excel as a spreadsheet application has many inbuilt functions which can solve your work very quickly within a few clicks. But you need to identify a proper function that can solve your task.

Today I am going to discuss a simple task, how to extract a month name from a date.

Can you guess which function might be suitable for this task?

Here I am going to use the excel text function to extract the month name from a given date.

So, What is the TEXT() function?

The TEXT function lets you change the way a number appears by applying formatting to it with excel text function format codes.

It’s useful in situations where you want to display numbers in a more readable format, or you want to combine numbers with text or symbols.

What is the syntax of the TEXT() function?

=TEXT(Value,format_text)

What are the criteria of the TEXT() function?

=TEXT(Value you want to format, “Format code you want to apply”)

Let’s take this example file to explain how the TEXT() function works.

excel text function example

Here in the above example, you see four columns that represent some supply data with the date of supply. Now you need to extract the month’s name from the date of the supply column.

So, you need to put two criteria in the function to extract the month’s name from the date

The first criteria are “Value you want to format” I,e Date of Supply, and the second criterion is “Format code you want to apply” for these criteria see the following format codes you need to use:

excel text function format codes

As you need to extract months you can use the code “mmm” or “mmmm”.

The actual formula looks like

=TEXT(B4,”mmm”) ——–for extract month in Jun format or like,

=TEXT(B4,”mmmm”) —– for extract month in June format.

See the screenshot of how the formula works

excel text function date

In the same way, using TEXT function you can extract day and year also as per your need.

The most important point you should remember that always put a double quotation mark

 (“ “) when writing the format code otherwise it will show an error.

Conclusion

An Excel function can be used for various situations, here in this article you see only one usage of TEXT function but it will be applicable to other cases of number-to-text conversion also. I feel that If you learn any spreadsheet functions according to a particular situational problem and apply your knowledge then you never forget any functions and obviously practice what you learn as many times as possible.

Thanks for reading. Please suggest your valuable feedback and share it with your friends.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top