Unifying different date formats in a spreadsheet
Try this macro:
Sub fixum()
s1 = "d-mmm-yy"
s2 = "mm/dd/yy"
s3 = "m-dd-yy"
For Each r In ActiveSheet.UsedRange
If r.NumberFormat = s1 Or r.NumberFormat = s2 Or r.NumberFormat = s3 Then
r.NumberFormat = "dd mmmm yyyy"
End If
Next
End Sub
--
Gary''s Student - gsnu200754
"Bob W" wrote:
I inherited a spreadsheet with 2,285 rows; each row has dates typed into
them, and the dates are in three random formats, ie,
5-Aug-05
12/27/97
3-12-04
Is there a way, other than manually, to correct all the dates to one uniform
date format?
|