What is the "1" in this month function doing? Excel 2007

I have a function that is working fine, however I would like to know wihat the "1" in the function doing.

A1   contains "JAN"

The functions is MONTH(1&A1)
moriniaAdvanced Analytics AnalystAsked:
Who is Participating?
 
barry houdiniCommented:
You can only apply MONTH function to a date....so you can't do this

=MONTH(A1)

if A1 contains text like "Jan" or "March".....but if you type 1jan into a cell in excel then Excel interprets that as a date - 1st Jan (in the current year). Of course you don't care about the year here, so concatenating the 1 to the month in text gives you a date that MONTH can work with.....

Of course you could easily use

=MONTH(2&A1) or similar

regards, barry

0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
it will make that the MONTH will evaluate ("1JAN") will will indeed then be able to interprete the string.
MONTH("JAN") will not work, hence this "trick"
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.