I would store the rows in an array, then use Union to collect all the rows in a variable and Intersect that with each column.
This way you can access all defined rows of a specific column at once.
Option Explicit
Public Sub example()
Dim RowArr() As Variant
RowArr = Array(1, 3, 17) 'define your rows here
Dim AllRows As Range
With ActiveSheet
Dim Row As Variant
For Each Row In RowArr
If AllRows Is Nothing Then
Set AllRows = .Rows(Row)
Else
Set AllRows = Union(AllRows, .Rows(Row))
End If
Next Row
'write in all rows of a specific column
Intersect(.Columns("R"), AllRows).FormulaR1C1 = "=RC[-1]"
Intersect(.Columns("W"), AllRows).FormulaR1C1 = "=(RC[-5]*RC[-7])+RC[-2]"
Intersect(.Columns("Y"), AllRows).FormulaR1C1 = "=RC[-12]*RC[-2]"
End With
End Sub
Instead of the loop you can also write:
Set AllRows = .Range("1:1,3:3,17:17")
like
Option Explicit
Public Sub example()
With ActiveSheet
Dim AllRows As Range
Set AllRows = .Range("1:1,3:3,17:17")
'write in all rows of a specific column
Intersect(.Columns("R"), AllRows).FormulaR1C1 = "=RC[-1]"
Intersect(.Columns("W"), AllRows).FormulaR1C1 = "=(RC[-5]*RC[-7])+RC[-2]"
Intersect(.Columns("Y"), AllRows).FormulaR1C1 = "=RC[-12]*RC[-2]"
End With
End Sub
but this works only for a smaller amount of rows. If you have more you need to use Union