Month function returns 1 (Jan) for June

provincial

New Member
Joined
Jul 28, 2006
Messages
49
What am I missing

I have a date in A9 (serial 40342 displayed as 13/06/2010 in dd/mm/yyyy format) and in B9 have the formula =MONTH(A9) which returns 1 (or Jan when formatted "mmm").

The desired result of the MONTH() function in B9 is 6 (Jun) of course.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
With the serial number 40342, yes the date is 13/06/2010 with a format of dd/mm/yyyy.

The result of =Month(A9) is 6 which to Excel in a date format is 1/6/1900.

Dates start at 1/1/1900 in Excel so a 6 is 1/6/1900.

If you want the 6 to become Jun you could try, =DATE(YEAR(A9),MONTH(A9),1) with your custom format of mmm.

Not sure if this is the most efficient way but at least my attempt.
 
Upvote 0
If it's a date in A9 the MONTH function should return 6 not 1.
 
Upvote 0
What am I missing

I have a date in A9 (serial 40342 displayed as 13/06/2010 in dd/mm/yyyy format) and in B9 have the formula =MONTH(A9) which returns 1 (or Jan when formatted "mmm").

The desired result of the MONTH() function in B9 is 6 (Jun) of course.
Are you sure you're referring to the correct cell with the correct date in it?
 
Upvote 0
I see what jeffreybrown is saying because if you are formatting the result of the month formula to get the month name, you are going to get the wrong result.

If you are trying to return the month name:

=A9

and format as mmm
 
Upvote 0
Are you sure you're referring to the correct cell with the correct date in it?
After reading some more of the replies this is becomming a bit confusing.

Do you want the month NUMBER or the month NAME?

MONTH returns the month NUMBER, a number from 1 to 12.

If you want the month NAME try one of these...

A9 = 13/06/2010

For the short month name: Jun

=TEXT(A9,"mmm")

For the long month name: June

=TEXT(A9,"mmmm")
 
Upvote 0
Many thanks to you all

I started a new workbook, entered the date (13/06/2011) and use the month formula in the adjacent cell and it worked (returned 6)!

I returned to my original workbook and rekeyed the date and this worked also. I can only assume my original problem was created from the data having been imported from a quickbooks export.

Once again, thanks
 
Upvote 0
Many thanks to you all

I started a new workbook, entered the date (13/06/2011) and use the month formula in the adjacent cell and it worked (returned 6)!

I returned to my original workbook and rekeyed the date and this worked also. I can only assume my original problem was created from the data having been imported from a quickbooks export.

Once again, thanks
Ok, good deal. Thanks for letting us know! :cool:
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,833
Members
452,947
Latest member
Gerry_F

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