Would it be wrong if write the following code
Sub Something()
Dim i As integer
Dim xRange As Range
Dim yRange As Range
Set xRange= Range("x_table")
Set yRange= Range("y_table")
For i = 1 To xRange.Columns.Count
xRange.Columns(i) = Application.Sum(y_table.Columns(i))
Next i
End Sub
without specifically declaring each of the variables? Like bellow;
Sub Something()
Set xRange= Range("x_table")
Set yRange= Range("y_table")
For i = 1 To xRange.Columns.Count
xRange.Columns(i) = Application.Sum(y_table.Columns(i))
Next i
End Sub