#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Date display

Hi can you help?

I would like to display a date like the example that follows. M 18.09 I
would like to show the first intial of the day for example M for Monday
followed by the date in numbers like 18 and then the month also in numbers
like 09 not bothered about the year

Thanks Joel
--
N/A
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Date display

If it can be in another cell then

=LEFT(TEXT(A1,"ddd"))&" "&TEXT(A1,"dd\.mm")

If you want it as a format, not sure that is doable.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Joel" wrote in message
...
Hi can you help?

I would like to display a date like the example that follows. M 18.09 I
would like to show the first intial of the day for example M for Monday
followed by the date in numbers like 18 and then the month also in numbers
like 09 not bothered about the year

Thanks Joel
--
N/A



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Date display

Hi Joel

FormatCellsNumberCustom ddd dd.mm
will produce Mon 18.09
which can still be used as a date in further calculations.

To get what you asked for, and with the date in A1, use
=LEFT(TEXT(A1,"ddd"))&" "&TEXT(A1,"dd.mm")
but note that the result is a text value and cannot be used in any further
calculation.
--
Regards
Roger Govier

"Joel" wrote in message
...
Hi can you help?

I would like to display a date like the example that follows. M 18.09 I
would like to show the first intial of the day for example M for Monday
followed by the date in numbers like 18 and then the month also in numbers
like 09 not bothered about the year

Thanks Joel
--
N/A


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Date display

If you don't mind using a worksheet event, the following will convert an
entered date in a cell into the format you asked for (but the entry will be
text afterwards)...

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo Whoops
Application.EnableEvents = False
If IsDate(Target.Value) Then Target.Value = _
Left(Format(Target.Value, "ddd"), 1) & _
Format(Target.Value, " dd.mm")
Whoops:
Application.EnableEvents = True
End Sub

If this is unfamiliar to you, simply right-click on the worksheet tab for
the worksheet you want this functionality on and select View Code from the
popup menu that appears; then copy/paste the above code into the window that
appeared. When you go back to the worksheet, any cell that you enter a date
into will have that date converted to the format you indicated. If you want
to restrict this functionality, use the code below and specify the range it
should operate over in the Range function call in the first code line where
I placed "A:A" (for example purposes - it restricts the functionality to
Column A)...

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
On Error GoTo Whoops
Application.EnableEvents = False
If IsDate(Target.Value) Then Target.Value = _
Left(Format(Target.Value, "ddd"), 1) & _
Format(Target.Value, " dd.mm")
Whoops:
Application.EnableEvents = True
End Sub

Rick


"Joel" wrote in message
...
Hi can you help?

I would like to display a date like the example that follows. M 18.09 I
would like to show the first intial of the day for example M for Monday
followed by the date in numbers like 18 and then the month also in numbers
like 09 not bothered about the year

Thanks Joel
--
N/A


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
Dates - Need to display date one month prior to user-entered date brettopp Excel Worksheet Functions 13 December 3rd 07 05:58 PM
display the day of the date oldLearner57 Excel Discussion (Misc queries) 3 November 12th 07 05:00 PM
Formula to Display Date n-Workdays from a Certain Date BHadds Excel Discussion (Misc queries) 4 June 13th 07 09:49 PM
X axis date - display beyond latest date. Dave F. Charts and Charting in Excel 1 January 3rd 07 03:17 AM
Date display new2XL Excel Discussion (Misc queries) 1 June 14th 06 04:33 PM


All times are GMT +1. The time now is 12:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"