I have some code that steps through a Data Entry sheet and polls a column of dates (Column “I”). I get a “: Type mismatch: at the “Sdate = Cells(i, "I").Value” statement. If I go to the Data Entry sheet, select the entire column I, and format the cells as Date format, then the next time I run the code I will not get the error. However, the next time I run the code after that I will get the error again and I must go back and reformat the column to Date format. Do you have any ideas as to what may be causing this? (I am using Excel 2000.)
Thanks.
Dim Sdate As Date
With Sheets("Data Entry").Range("PTSource")
LastRow = .Rows.Count
For i = 2 To LastRow
Sdate = Cells(i, "I").Value
Etc.
Thanks.
Dim Sdate As Date
With Sheets("Data Entry").Range("PTSource")
LastRow = .Rows.Count
For i = 2 To LastRow
Sdate = Cells(i, "I").Value
Etc.