View Single Post
  #4   Report Post  
Anne Troy
 
Posts: n/a
Default

Hi, J. If you want this to occur automatically, and supposing you type these
values into column A, then you can right-click the worksheet tab and hit
View Code. Then paste this code into the code window that appears at right:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Application.Intersect(Target, Range("A:A")) Is Nothing Then
Target(1).Value = Left(Target(1), 2) & "-" & Mid(Target(1), 3, 2) & "-"
& Right(Target(1), 2)

End If
Application.EnableEvents = True
End Sub

Code stolen from Chip Pearson's site and adapted for your purpose.
http://www.cpearson.com/excel/case.htm

*******************
~Anne Troy

www.OfficeArticles.com


"JFlorindo" wrote in message
...
How do i format a text cell in Excel, for example: 1122AA to 11-22-AA