[vba]

Dim rng As Range
Dim LastRow As Long
Dim i As Long

With Worksheets(1)

LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 2 To LastRow

If .Cells(i, "A").Value2 <> "" Then

.Cells(i, "J").Value = "Thank you"
If rng Is Nothing Then

Set rng = .Cells(i, "A").Resize(, 10)
Else

Set rng = Union(rng, .Cells(i, "A").Resize(, 10))
End If
End If
Next i

If Not rng Is Nothing Then rng.Select
End With
[/vba]