• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 237
  • Last Modified:

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)
0
morinia
Asked:
morinia
2 Solutions
 
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
 
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now