#1   Report Post  
Neil
 
Posts: n/a
Default Date Formatting

Can anyone help me with a small problem I have with Date Fomatting?

I have an Excel based application where people need type the name of a month
into a cell, the only problem is that the cell isn't big enough to show the
entire month name for the longer months. I want to try to add some sort of
formatting so that if 'December' is entered for instance the cell is
automatically truncated to 'Dec'.
I can't seem to find anywhere in the formatting menu that solves this
problem, does anyone have a solution they could offer?

Thanks

Neil
  #2   Report Post  
JulieD
 
Posts: n/a
Default

Hi Neil

as "december" typed into a cell isn't a "date" rather text you'll need to
use either autocorrect to change it to Dec - however, this will affect every
entry of December into any workbook or word document OR use a
worksheet_change event

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Value = "December" Then Target.Value = "Dec"
End Sub

to use this, right mouse click on the sheet tab that you want this to happen
to and choose view code
now copy & paste this into the area on the right of the screen.
use ALT & F11 to switch back to your workbook to test.

Cheers
JulieD




"Neil" wrote in message
...
Can anyone help me with a small problem I have with Date Fomatting?

I have an Excel based application where people need type the name of a
month
into a cell, the only problem is that the cell isn't big enough to show
the
entire month name for the longer months. I want to try to add some sort of
formatting so that if 'December' is entered for instance the cell is
automatically truncated to 'Dec'.
I can't seem to find anywhere in the formatting menu that solves this
problem, does anyone have a solution they could offer?

Thanks

Neil



  #4   Report Post  
Jason Morin
 
Posts: n/a
Default

Why not just widen the column? Or as an alternative, you
could set up AutoCorrect entries (go to Tools
AutoCorrect Options) and set up each month so that it's
replaced by its 3 char. abbreviation. For example,

Replace: December
With: Dec

HTH
Jason
Atlanta, GA

-----Original Message-----
Can anyone help me with a small problem I have with Date

Fomatting?

I have an Excel based application where people need type

the name of a month
into a cell, the only problem is that the cell isn't big

enough to show the
entire month name for the longer months. I want to try to

add some sort of
formatting so that if 'December' is entered for instance

the cell is
automatically truncated to 'Dec'.
I can't seem to find anywhere in the formatting menu that

solves this
problem, does anyone have a solution they could offer?

Thanks

Neil
.

  #5   Report Post  
Jason Morin
 
Posts: n/a
Default

Why not just widen the column? Or as an alternative, you
could set up AutoCorrect entries (go to Tools
AutoCorrect Options) and set up each month so that it's
replaced by its 3 char. abbreviation. For example,

Replace: December
With: Dec

HTH
Jason
Atlanta, GA

-----Original Message-----
Can anyone help me with a small problem I have with Date

Fomatting?

I have an Excel based application where people need type

the name of a month
into a cell, the only problem is that the cell isn't big

enough to show the
entire month name for the longer months. I want to try to

add some sort of
formatting so that if 'December' is entered for instance

the cell is
automatically truncated to 'Dec'.
I can't seem to find anywhere in the formatting menu that

solves this
problem, does anyone have a solution they could offer?

Thanks

Neil
.



  #6   Report Post  
David McRitchie
 
Posts: n/a
Default

Setting up an AutoCorrect entry for this would cause nothing
but troubles in use of Office products. Don't do it.

Widening the column was specifically rejected in the original
post.

For Don's suggestion, you might as well make that
target.value = application.proper(left(target,3))

more information on event macros in
http://www.mvps.org/dmcritchie/excel/event.htm
be sure to limit the scope of the macro to a specific column(s),
and not update row 1 descriptions.

If you had the means of obtaining an actual date, you could
use custom cell formatting. mmm which would affect
display and not the value.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jason Morin" wrote...
set up AutoCorrect entries (go to Tools
AutoCorrect Options) and set up each month so that it's
replaced by its 3 char. abbreviation. For example,

Replace: December
With: Dec




  #7   Report Post  
Neil
 
Posts: n/a
Default

Thanks for everyones help on this one, I've decided to go the VBA route on
this one.

If anyone has any expertise on charts, I've posted a couple of questions
there too ;-)

"David McRitchie" wrote:

Setting up an AutoCorrect entry for this would cause nothing
but troubles in use of Office products. Don't do it.

Widening the column was specifically rejected in the original
post.

For Don's suggestion, you might as well make that
target.value = application.proper(left(target,3))

more information on event macros in
http://www.mvps.org/dmcritchie/excel/event.htm
be sure to limit the scope of the macro to a specific column(s),
and not update row 1 descriptions.

If you had the means of obtaining an actual date, you could
use custom cell formatting. mmm which would affect
display and not the value.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Jason Morin" wrote...
set up AutoCorrect entries (go to Tools
AutoCorrect Options) and set up each month so that it's
replaced by its 3 char. abbreviation. For example,

Replace: December
With: Dec





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
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM
Auto date changing in Excel is maddening brhicks Charts and Charting in Excel 3 December 16th 04 02:54 PM
How do I convert a Julian date into a regular date? Jessica Excel Discussion (Misc queries) 4 December 2nd 04 02:54 AM
Formatting date fields after export Raymond Excel Discussion (Misc queries) 2 December 1st 04 12:04 AM
Cells losing formatting BdgBill Excel Discussion (Misc queries) 1 November 26th 04 08:03 AM


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