Conversion

  • Thread starter Thread starter Robert
  • Start date Start date
R

Robert

Hello
Some strange behaviour to report.
My excel spreadsheet has a list of dates that have suddenly been
converted to Text format i.e. 02/09/04 is showing up as 2/09/04.
I can remedy this by formatting the cell to dd/mm/yy but it isn't until
I click within the cell that it changes to 02/09/04.
Is there a solution to this as there are quite a number of cells>

Rob
 
Rob,

Select all the cells, and run this macro:

Sub TryNow()
Dim myCell As Range
Selection.NumberFormat = "mm/dd/yyyy"
For Each myCell In Selection
myCell.Value = myCell.Text
Next
End Sub

HTH,
Bernie
MS Excel MVP
 
Back
Top