Cell Edit

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

Hello All,

I have a program that exports files into Excel format.
The problem is that the date is formatted as a number, I
cannot change the format through "Format Cells". The
only way to get Excel to recognize this as a date is to
edit (F2) each cell or click in the formula bar and hit
enter.

Any help with this would be appreciated as I sometimes
have thousands of rows with dates.

Thanks in advance.
 
try this

Sub ConvertThem() 'Harald Staff
Dim C As Range
For Each C In Intersect(Selection, _
ActiveSheet.UsedRange)
If Not C.HasFormula Then
If IsNumeric(C.Value) Then
C.Value = C.Value * 1
End If
End If
Next
End Sub
 
Back
Top