#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Month

I am using

=MONTH(H6)

and have the format of the cell set to mm the value is
stuck at 01 and I cannot understand why.

=YEAR(H6) works fine.

Many Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Month

Hi
don't format the cell as MM. just format the cell as 'Number' or
'General'

--
Regards
Frank Kabel
Frankfurt, Germany


Rich wrote:
I am using

=MONTH(H6)

and have the format of the cell set to mm the value is
stuck at 01 and I cannot understand why.

=YEAR(H6) works fine.

Many Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Month

try this
Format Cell Custom 0

----- Rich wrote: ----

I am using

=MONTH(H6

and have the format of the cell set to mm the value is
stuck at 01 and I cannot understand why

=YEAR(H6) works fine

Many Thank

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Month

On Sun, 16 May 2004 10:55:31 -0700, "Rich"
wrote:

I am using

=MONTH(H6)

and have the format of the cell set to mm the value is
stuck at 01 and I cannot understand why.

=YEAR(H6) works fine.

Many Thanks


=MONTH(H6) returns a number in the range of 1-12.

When you format the cell as 'mm', Excel thinks you mean a date.

Excel stores dates as serial numbers where 1 = 1 jan 1900 (or 1904).

So when Excel sees a date that is in the range of 1-12, it interprets that as a
date in the range 1 Jan to 12 Jan 1900 (or 1904). So that function will always
return a 1 since the number represents the month of January.

It is only serendipity that YEAR(H6) appears to work. It is probably really
returning a year in the early 1900's.

Suggestion: format the cell as General.


--ron
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Month

Hi,

mm is minutes, format to mmm for Month.

Matt


-----Original Message-----
I am using

=MONTH(H6)

and have the format of the cell set to mm the value is
stuck at 01 and I cannot understand why.

=YEAR(H6) works fine.

Many Thanks
.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Month


"Ron Rosenfeld" wrote in message
...
On Sun, 16 May 2004 10:55:31 -0700, "Rich"
wrote:

It is only serendipity that YEAR(H6) appears to work.


I wouldn't call it serendipitous if that was what you were looking for,
fortuitous maybe, but not serendipitous.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Month

On Sun, 16 May 2004 20:56:46 +0100, "Bob Phillips"
wrote:


"Ron Rosenfeld" wrote in message
.. .
On Sun, 16 May 2004 10:55:31 -0700, "Rich"
wrote:

It is only serendipity that YEAR(H6) appears to work.


I wouldn't call it serendipitous if that was what you were looking for,
fortuitous maybe, but not serendipitous.


You can call it either. The first definition of serendipitous includes
fortuitous. (Random House Webster's Unabridged Dictionary V3.0)

serendipitous, adj.
1. come upon or found by accident; fortuitous: serendipitous scientific
discoveries.



--ron
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Month

It may include fortuitous, but if it is fortuitously finding what you
expected, where is the happy accident in that?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Ron Rosenfeld" wrote in message
...
On Sun, 16 May 2004 20:56:46 +0100, "Bob Phillips"
wrote:


"Ron Rosenfeld" wrote in message
.. .
On Sun, 16 May 2004 10:55:31 -0700, "Rich"
wrote:

It is only serendipity that YEAR(H6) appears to work.


I wouldn't call it serendipitous if that was what you were looking for,
fortuitous maybe, but not serendipitous.


You can call it either. The first definition of serendipitous includes
fortuitous. (Random House Webster's Unabridged Dictionary V3.0)

serendipitous, adj.
1. come upon or found by accident; fortuitous: serendipitous scientific
discoveries.



--ron



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Month

"Rich" skrev i melding
...
=MONTH(H6)
and have the format of the cell set to mm the value is
stuck at 01 and I cannot understand why.
=YEAR(H6) works fine.


It's not very obvious what you expect to see. MONTH returns the month
/number/. YEAR returns the year number -which usually is just fine. If you
want to see "feb" or "oct" then either
=TEXT(H6,"mmm")
for returning the real text, or
=H6
format cell as "mmm", for keeping the date and just display the text.
=MONTH(H6) formatted as mmm will always return jan btw, so son't do that.

HTH. Best wishes Harald


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Re2: Month

"Rich" skrev i melding
...
I am using

=MONTH(H6)

and have the format of the cell set to mm the value is
stuck at 01 and I cannot understand why.


Sent too quick, sorry. Completed
=MONTH(H6) formatted as mmm will always return jan btw, so son't do that.
The formula will return month number as stated, and dates 1 to 12 is January
1st to january 12th 1900. Which are all in january, month 01.




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Month

Could do
=MONTH(H6) * 29
then format as mm

It's rough, but how often does the calendar change?

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Harald Staff" wrote in message
...
"Rich" skrev i melding
...
I am using

=MONTH(H6)

and have the format of the cell set to mm the value is
stuck at 01 and I cannot understand why.


Sent too quick, sorry. Completed
=MONTH(H6) formatted as mmm will always return jan btw, so son't do that.
The formula will return month number as stated, and dates 1 to 12 is

January
1st to january 12th 1900. Which are all in january, month 01.




  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Month

On Mon, 17 May 2004 07:59:48 +0100, "Bob Phillips"
wrote:

It may include fortuitous, but if it is fortuitously finding what you
expected, where is the happy accident in that?


OIC your point now.

Since he was formatting the MONTH result as a date, I assumed (I know my
assumption may be incorrect), that he was also formatting the YEAR as a date.




--ron
  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Month

Ron,

I was just picking up on the word, Serendipity is one of my favourites.

Regards

Bob

"Ron Rosenfeld" wrote in message
...
On Mon, 17 May 2004 07:59:48 +0100, "Bob Phillips"
wrote:

It may include fortuitous, but if it is fortuitously finding what you
expected, where is the happy accident in that?


OIC your point now.

Since he was formatting the MONTH result as a date, I assumed (I know my
assumption may be incorrect), that he was also formatting the YEAR as a

date.




--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
excel to make the days cary over month to month automaticly GARY New Users to Excel 1 April 19th 08 06:05 PM
Excel 2003 month to month data change grid Chad[_2_] Excel Discussion (Misc queries) 2 February 15th 08 01:36 AM
Converting Month Number to Month Text Abbreviation Bob Excel Worksheet Functions 10 May 12th 07 04:11 AM
When using MONTH function on Blank Cell!! Returns Month=Jan! mahou Excel Discussion (Misc queries) 6 January 9th 06 02:46 AM
transfer cell $ amount to other sheet month-to-month without overc Colin2u Excel Discussion (Misc queries) 1 July 28th 05 02:36 AM


All times are GMT +1. The time now is 04:31 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"