Macro to format date
Try this one.
Sub Macro1()
Dim X As Long
For X = 1 To 256
If Cells(1, X) = "Date" Then
Columns(X).NumberFormat = "dd/mm/yy"
End If
Next X
End Sub
Ecco
-----Original Message-----
I am looking for some code that will look through my
spreadsheet, find all columns headers called "Date"
(which
will always be in row 1) and on finding a date column
format all cells in that column to the date format
dd/mm/yy.
Can anyone help with this.
Thanks
.
|