Thread: Text to Date
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Steved Steved is offline
external usenet poster
 
Posts: 519
Default Text to Date

I thankyou very much.

"Gord Dibben" wrote:

Steved

Try this small adjustment.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A5:AB272"), .Cells) Is Nothing Then
Application.EnableEvents = False
If Not IsEmpty(.Value) Then
Me.Range("B3") = Format(Now, "dd mmm")
End If
Application.EnableEvents = True
End If
End With
End Sub


Gord Dibben MS Excel MVP

On Mon, 7 Aug 2006 14:27:01 -0700, Steved
wrote:

Hello from Steved

I've done exactly what you have asked, and yes it had done exatly as you all
said, however I run the below vba and exch time I change the cell it reverts
back to 8/8/2006 9:25:11, Is there please another answer.
Thankyou

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A5:AB272"), .Cells) Is Nothing Then
Application.EnableEvents = False
If Not IsEmpty(.Value) Then
Me.Range("B3") = Now
End If
Application.EnableEvents = True
End If
End With
End Sub




"Steved" wrote:

Hello from Steved

I formatted a cell in text now I want to custom it to dd-mmm, It is not
allowing me to acheive this.

8/8/2006 7:51:09 AM this is the result, I would like it to be 8-Aug, no
matter when I try change it in Custom to dd-mm I still get 8/8/2006 7:51:09
AM.

Any help please.
Thankyou.