convert a date format for over 500 rows using a For Next Loop
问题 I need to convert dates (up to last row) in column "C" from the existing format 24/01/2016 to 24.01.2016 The result has to be in date format. My current code is: LastRow9 = ws5.Cells(Rows.Count, "C").End(xlUp).Row For X9 = 1 To LastRow9 searchvalue = Cells(X9, "C").Value Answer = Split(searchvalue, "/") ws5.Cells(X9, "A").Value = Answer ws5.Cells(X9, "A").Value = Format(Answer, "dd.mm.yyyy") Next X9 the answer i get is 30.12.1899 a bit off the mark 回答1: Try changing the Range.NumberFormat