Yuo need to step backwards as @braX stated. Also specified number exceeds Integer variable type capacity. In VBA it is a good practice for ingeter values to always declare variable as Long.
Range "Data" is nowhere set. I replaced it with reference to active worksheet.
Variable YearA is also not specified. I assigned value of 2018 to it. Date function is incorrectly used, you meant to use DateSerial.
Always put Option Explicit on top of the code to catch errors. There were really many here.
Option Explicit
Sub removeWrongYear()
Dim i As Long, yearA as Long
yearA = 2018
With ActiveSheet
For i = 635475 to 2 Step -1
If .Cells(i,20).Value > DateSerial(yearA,12,31) Then .Rows(i).EntireRow.Delete
Next i
End With
End Sub
Here is a fast version, based on arrays, with all rows deleted at once:
Option Explicit
Option Base 1 'row and column index will match array index
Sub removeWrongYear()
Dim i As Long, yearA As Long, rowsCnt As Long
Dim rowsToDelete As Range
Dim vData As Variant
yearA = 2018
With ActiveSheet
'1st to 635475 row, 20th column
vData = Range(.Cells(1, 20), .Cells(635475, 20))
For i = UBound(vData) To 2 Step -1
If vData(i, 1) > DateSerial(yearA, 12, 31) Then
rowsCnt = rowsCnt + 1
If rowsCnt > 1 Then
Set rowsToDelete = Union(rowsToDelete, .Rows(i))
ElseIf rowsCnt = 1 Then
Set rowsToDelete = .Rows(i)
End If
End If
Next i
End With
If rowsCnt > 0 Then
Application.ScreenUpdating = False
rowsToDelete.EntireRow.Delete
Application.ScreenUpdating = True
End If
End Sub
YearA?Data? Programmatic sheet name?