Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This works just fine until I reach a cell with no data, i.e., empty.
Is there a way to modify the code so it will exclude/ignore empty cells and continue converting the remainder of the column? Try this... Dim X As Long Dim ModifiedDateString As String For X = 1 To Cells(Rows.Count, "A").End(xlUp).Row If Len(Range("A" & CStr(X)).Value) 0 Then ModifiedDateString = Replace(Range("A" & CStr(X)).Value, ":000", " ") Range("A" & CStr(X)).Value = DateValue(ModifiedDateString) & " " & _ TimeValue(ModifiedDateString) End If Next Rick |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Converting text format of time/date into Excel time/date for subtr | Excel Worksheet Functions | |||
Help converting text to date & time? | Excel Worksheet Functions | |||
Need help converting Number stored as Text to Date | Excel Discussion (Misc queries) | |||
converting general text to date time | Excel Discussion (Misc queries) | |||
converting text in cell to a date time | Excel Worksheet Functions |