ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell Edit (https://www.excelbanter.com/excel-programming/280547-cell-edit.html)

Tim[_29_]

Cell Edit
 
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.

Don Guillett[_4_]

Cell Edit
 
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
"Tim" wrote in message
...
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.





All times are GMT +1. The time now is 03:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com