View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Current Month with real date

I don't understand how:
=TEXT(EDATE(TODAY(),0),"mmmm")
can return ###'s.

Are you sure that this is the formula you used?

This:
=month(now())
will return the number 11 (if you put it in a cell that is formatted as
General).

If you format that cell as a date, then excel will see that 11 as the 11th day
after a base date--and for most people in the wintel world, that base date is
December 31, 1899. So 11 is seen as January 11, 1900.

So format the cell as general and you'll see the 11.

Same kind of thing with
=year(month(now()))

That's the equivalent of:
=year(11) the 11th day of 1900.

=========
If you have a real date in A1, you could just give it a custom format:

MMMM YYYY
(or whatever you want)

with:
=today()
as the formula in A1


Keyrookie wrote:

Hey all,

I'm trying to have a cell always reflect the current month and year.
I'm sure it's a simple formula but I need some help. I'm wanting this
formula in a cell and then I have a calendar control cell that is
linked to to it... ie.

A1 (formula cell) and then D15=A1

I've already used

=TEXT(EDATE(TODAY(),0),"mmmm") this returns nothing but ###### etc.

and

=(MONTH(NOW())) this returns Jan 1900

and

=YEAR(MONTH(NOW())) this returns Mar 1905

The calendar works fine when I have real date (11/1/2005) in cell A1.

Help please,

K

--
Keyrookie


--

Dave Peterson