I'm trying to parse the date and time out of a date-time field. I know how to loop through my data using VBA to insert a formula in a new column. I want to make sure the loop ignores cells that are blank. Otherwise I end up with date 1/1/1900 where there should be nothing.
Dim lstrow As Integer
Dim i As Integer
Application.ScreenUpdating = False
lstrow = Cells(Rows.Count, 1).End(xlUp).Row
Range("X3:X" & lstrow).FormulaR1C1 = "=INT(RC[-1])"
Application.ScreenUpdating = True