I think most of the lines are wrong.
May be

Sub test()

With Sheets("S")
 'Final 1
   FinalS1 = .Cells(Rows.Count, 1).End(xlUp).Row

  .Cells((FinalS1 + 1), 3).Value = .Name

 End With

End Sub