#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default month formula

Hi All

A question - if I type in the date 14/12/2004 and in the column next to it
use the month formula with the cell format set to general it correctly
returns 12. However if I want it to show say Dec I went to custom typed in
mmm and it always returns Jan.

Why is this and is there a better way to return the month description rather
than month number.

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default month formula

On Fri, 25 Aug 2006 04:44:01 -0700, Reggiee
wrote:

Hi All

A question - if I type in the date 14/12/2004 and in the column next to it
use the month formula with the cell format set to general it correctly
returns 12. However if I want it to show say Dec I went to custom typed in
mmm and it always returns Jan.

Why is this and is there a better way to return the month description rather
than month number.

Thanks


Why?

Excel stores dates as serial numbers with 1 = 1 Jan 1900 (or 1 Jan 1904).

=Month("14 Dec 2004") returns the number 12. Day 12 is equivalent to 12 Jan
1900 so formatting that as a month would return Jan.

To do what you want, with A1: 14/12/2004

B1: =A1
Format/Cells/Number/Custom Type: mmm

or

B1: =TEXT(A1,"mmm")

The first retains the date in B1; the second will result in a text string.


--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default month formula

top man Ron - I did understand about how excel stores dates but nevertheless
i found the fact that it returned the number correctly ok but not the
description somewhat baffling

thanks again

"Ron Rosenfeld" wrote:

On Fri, 25 Aug 2006 04:44:01 -0700, Reggiee
wrote:

Hi All

A question - if I type in the date 14/12/2004 and in the column next to it
use the month formula with the cell format set to general it correctly
returns 12. However if I want it to show say Dec I went to custom typed in
mmm and it always returns Jan.

Why is this and is there a better way to return the month description rather
than month number.

Thanks


Why?

Excel stores dates as serial numbers with 1 = 1 Jan 1900 (or 1 Jan 1904).

=Month("14 Dec 2004") returns the number 12. Day 12 is equivalent to 12 Jan
1900 so formatting that as a month would return Jan.

To do what you want, with A1: 14/12/2004

B1: =A1
Format/Cells/Number/Custom Type: mmm

or

B1: =TEXT(A1,"mmm")

The first retains the date in B1; the second will result in a text string.


--ron

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default month formula

On Fri, 25 Aug 2006 05:55:02 -0700, Reggiee
wrote:

top man Ron - I did understand about how excel stores dates but nevertheless
i found the fact that it returned the number correctly ok but not the
description somewhat baffling

thanks again


You're welcome.

Glad to help.
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula for calculating 12 month rolling period Stroodle Excel Discussion (Misc queries) 0 August 17th 06 03:16 PM
Weekday formula calculating to end of month DebbieK Excel Worksheet Functions 0 July 26th 06 08:08 PM
Formula = Today's date + 1 month jermsalerms Excel Worksheet Functions 5 February 8th 06 09:51 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula for # of sales days in a month? Kerry Rosvold Excel Worksheet Functions 2 June 1st 05 09:11 PM


All times are GMT +1. The time now is 11:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"