r = Sheet1.Cells(Cells.Rows.Count, "A").End(xlUp).Row
col = 13
For x = 2 To r
f = Sheet3.Cells(Cells.Rows.Count, "A").End(xlUp).Row
For s = 0 To 2 Step 2
Set cell = Sheet1.Cells(x, col + s)
If cell.Value = "" Then Exit For
If cell.Value = 1 Then
f = f + cell.Value