It does not matter which row you start since we are testing for each row for a condition.
I know why the code fails.
My assumption was you have data starting from row 1

Change this line from a1 to a5

 With Worksheets("Sheet1")
    x = .Range("a6").CurrentRegion
 End With