Did I Break the MONTH Function with the TEXT Function?

preitano

New Member
Joined
Apr 1, 2015
Messages
11
Hi,

I'm calculating the first Thursday of the next month based on today's date, which in the screenshot below properly generates 2/1/24.
Next, I'm attempting to get the 3 letter abbreviation of the month name for a search, so I'm using MONTH combined with TEXT.

MONTH on its own generates the expected 2, but when I couple it with TEXT I'm getting "Jan" for some reason.

I've displayed the formulas next to the results.

What am I doing wrong?

Thanks

2024-01-09 08_39_30-Window.png
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
You don't need (or want) the MONTH function there at all. Just use
Excel Formula:
=TEXT($J$9,"mmm")
 
Upvote 0
Just an explanation what is going on...

It is important to understand how Excel stores dates. It stores them as numbers, specifically the numbers of days since 1/0/1900 (enter any valid date, change the format of the cell to General, and you will see the date as Excel sees it). So then dates are really just large integers with a special date format.

So, if you use:
Excel Formula:
MONTH(J9)
that will return a value of "2".
If you try to format "2" as a date, you are actually referring to the date 1/2/1900, which is why your TEXT function on that calculation returns January.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,333
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top