Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Thu, 28 Sep 2006 12:26:29 GMT, "FIRSTROUNDKO via OfficeKB.com" <u15639@uwe
wrote: Ron I dont mind using VBA Thanks Darren The simplest way would be to format the cells the way I suggested unless you absolutely require a text string instead of an Excel recognizable date. Does the formatting not provide you with what you want? For most purposes, I would have thought that would be better. If that is not a better solution, you could do what you want with a VBA macro: ========================= Option Explicit Sub FormatDate() Dim c As Range For Each c In Selection If IsDate(c.Value) Then c.Value = "'" & Format(c.Value, "dd/mm/yyyy") End If Next c End Sub ======================= Of course, the dates would now be text strings and not easily usable by Excel as dates. They might seem to be usable, but how they would be interpreted would be dependent on the Windows Regional Settings. In other words, on my (US-centric) machine, '01/05/06' would be interpreted as 5 Jan 2006; On a different machine, it might be interpreted as 1 May 2006. --ron |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
calculating number of three month periods between two dates... | Excel Discussion (Misc queries) | |||
formula to add dates. | Excel Worksheet Functions | |||
PivotTables - Group Dates, excluding dates | Excel Discussion (Misc queries) | |||
Calculating number of days between two dates that fall between two other dates | Excel Discussion (Misc queries) | |||
2 digit year in dates return 19xx not 20xx | Excel Discussion (Misc queries) |