Solved

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

Posted on 2011-03-10
2
226 Views
Last Modified: 2012-05-11
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
Comment
Question by:morinia
2 Comments
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 125 total points
ID: 35095485
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
 
LVL 50

Accepted Solution

by:
barry houdini earned 125 total points
ID: 35095509
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question