Solved

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

Posted on 2011-03-10
2
225 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Find word and 6 digit number 22 98
Vb.net dynamic formulas in runtime 11 63
First Blank Cell in a range 7 35
Create Files based on Cell Values in a Range in Excel 12 20
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

867 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now