When it comes to tricky problems in Excel, we're always glad to help.
Today's tutorial is about a problem that threatened to confound for a little while, and led to a pretty neat solution. Read on to find out more!
A reader sent in a query about a problem that he was facing - he had a column of dates, and he wanted to extract the month from them. Here's a quick glance at the data:

Now, in an adjacent column, our friend wanted April, August, October and so and so forth. Essentially, extract the month, in text format. The obvious solution, of course, is the use of the "=MONTH()" formula".
Except that this returns a number, not text. So our first result would be "4" and not "April".
Umm, whoops.
We researched a little bit, and to the best of our knowledge, Excel doesn't have a formula that will return the month value in text format.
So we did the next best thing, which is to make use of a VLOOKUP formula. The VLOOKUP formula is one of the most powerful, yet easy-to-use formulas out there. It is pliant, it is flexible and it lends itself to a surprisingly large number of otherwise intractable problems.
So here's what we did. First of all, in another part of the sheet, we created an index of months and their text values:

Next: adjacent to our dummy data, we made use of the month formula:

And in the adjacent column, we wrote up a simple VLOOKUP:

K2:L13 is where we have stored our "index" of months and their corresponding textual values, of course.
Now, a couple of ways to simplify this even further. First things first, as discussed in an earlier post, we could simply name the index.

And we could use the "=MONTH()" formula in the VLOOKUP formula itself:

Ta-da! And that, my friends, is that!
Now, given that this is Excel, there are probably a million other ways to work this problem out, so we're all ears. If you know of a solution that will work out better than this, well, do let us know in the comments below! And as always, if you have more problems like these - do get in touch!
Update: David Onder sends in a solution that is simplicity itself, and it seems to work just fine.
=TEXT(C2,"MMMM")
wherein the date is entered into cell C2 should give you just the result that you need.
Replace "MMMM" with "dddd" or "yyyy" to get either the day or the year, respectively. Thanks a ton, David - that works out a lot better!
f55cb192-80f9-443f-90f7-7d7fa51c0225|2|3.5
Formulas