SOLVED Nathan_SAV had the right idea. For anyone looking at this for reference later I changed the code to
For x = 3 To lRow On Error Resume Next \'If then
The data may not be found, so try
Dim S as long Dim R as excel.range set R=Range("A:A").Find if R is nothing then 'Not found, handle else S=R.row end if