Cell Edit

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.
 
D

Don Guillett

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top