Month/ year function.

  • Thread starter Thread starter Houm
  • Start date Start date
H

Houm

Hi,
I would like to creat a functions that one of the
cell automatic fill as current month. Example the foramt
as " January " and other cell auto fill with current year?
what function should I use?

Any help would be very appreciated.
 
Houm said:
Hi,
I would like to creat a functions that one of the
cell automatic fill as current month. Example the foramt
as " January " and other cell auto fill with current year?
what function should I use?

Any help would be very appreciated.

=YEAR(NOW())
=MONTH(NOW())

/Fredrik
 
-----Original Message-----



=YEAR(NOW())
=MONTH(NOW())

/Fredrik

Thanks for the answer. But hwo can I use the Format
function to show as month of April instead of show as
number 4?
 
Thanks. But how come it show as January instead of the
current month as April.
 
Hi

When you want some fixed month of current year to be returned, then p.e.
=DATE(YEAR(TODAY()),1,1)
returns always 1st January of current year,
=DATE(YEAR(TODAY()),3,1)
returns always 1st March of current year, etc.

You can format the cell with this formula as custom "mmmm" - then "January"
or "March" etc. is displayed. Or you format this cell as "yyyy" - then the
current year number is displayed. Formatting the cell p.e. as "yyyy mmmm"
displays the date as "2005 January" or "2005 March", etc. When you refer to
this cell in formulas, you have always to remember, that really it is a
date.

When you really want the month returned as a text string, you can wrap this
formula into TEXT function, like
=TEXT(DATE(YEAR(TODAY()),1,1),"mmmm")

Arvi Laanemets
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top