Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jamie
 
Posts: n/a
Default Month Year Date Format

I am using Excel 2002. I have a document that is protected. Cell B2 is
unlocked so the user can input the month. What I would like to do is have
the date appear as: month year (e.g., February 2005). I need this to work
not only for the current month, but for the previous month, if the user needs
to input information for the previous month.

I've tried formatting the cell, using the Custom Category, mmmm yyyy.
However when I type February the year does not show. if I type just a 2 the
date shows up as January 1900. If possible I would like the month and year
to appear if the user types a number for the month (2 for February) or spells
out the month (February).

Thanks
--
Jamie
  #2   Report Post  
Bernie Deitrick
 
Posts: n/a
Default

Jamie,

You need to enter a valid date in that cell.

Simply enter 2/1 (or 2/1/5, or any value from 2/1 to 2/28) and it will show
up as February.

Enter 1/1 and it will show up as January.

HTH,
Bernie
MS Excel MVP

"Jamie" wrote in message
...
I am using Excel 2002. I have a document that is protected. Cell B2 is
unlocked so the user can input the month. What I would like to do is have
the date appear as: month year (e.g., February 2005). I need this to work
not only for the current month, but for the previous month, if the user

needs
to input information for the previous month.

I've tried formatting the cell, using the Custom Category, mmmm yyyy.
However when I type February the year does not show. if I type just a 2

the
date shows up as January 1900. If possible I would like the month and

year
to appear if the user types a number for the month (2 for February) or

spells
out the month (February).

Thanks
--
Jamie



  #3   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

Add an additional sheet, p.e. SetUp (later you can hide the sheet, as the
user don't need the access to it). Into A1 enter the formula
=DATE(YEAR(TODAY()),MONTH(TODAY())-1,1)
Into A2 enter the formula
=DATE(YEAR(TODAY()),MONTH(TODAY()),1)

Format both cells in any valid date format displaying month (and year) - in
this format you see later selections in drop-down list.
Select both cells, and define the selected area as named range, p.e. Month

Select the cell B2 on your original sheet, and format it as data validation
list with source:
=Month
and format the cell in desired date format, p.e. "mmmm yyyy"

Now you can always select between current and previous month in cell B2, or
you can enter manually the 1st date of those months in any valid date
format - no other entries are allowed at all.


Arvi Laanemets


"Jamie" wrote in message
...
I am using Excel 2002. I have a document that is protected. Cell B2 is
unlocked so the user can input the month. What I would like to do is have
the date appear as: month year (e.g., February 2005). I need this to work
not only for the current month, but for the previous month, if the user

needs
to input information for the previous month.

I've tried formatting the cell, using the Custom Category, mmmm yyyy.
However when I type February the year does not show. if I type just a 2

the
date shows up as January 1900. If possible I would like the month and

year
to appear if the user types a number for the month (2 for February) or

spells
out the month (February).

Thanks
--
Jamie



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
How to get only the year in the date format in Access yanu New Users to Excel 1 January 10th 05 03:50 AM
Format an excel column as a date for a 5 day week for a year. dabenesch Excel Discussion (Misc queries) 1 December 30th 04 02:45 PM
How can I format a cell so date field only displays the Month? tk_2u Excel Discussion (Misc queries) 3 December 4th 04 12:54 AM
create a date from year, day and month Baerbel Excel Worksheet Functions 3 November 13th 04 06:46 PM
Combine & Display “Fixed” & “Automatically Updated” Date Parts texcel Excel Worksheet Functions 1 November 1st 04 05:38 PM


All times are GMT +1. The time now is 12:25 PM.

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"