Sub Rectangle2_Click()
Dim wsA As Worksheet
Dim wsB As Worksheet
Dim lRow As Long
'~~> Set these to relevant sheets
Set wsA = Sheet3
Set wsB = Sheet4
'~~> Find last row in Sheet A
lRow = wsA.Range("A" & wsA.Rows.Count).End(xlUp).Row
'~~> Update formulas in Sheet B till relevant rows
wsB.Range("B2:W" & lRow).Formula = wsB.Range("B2:W2").Formula
Range("A2").AutoFill Destination:=Range("A2:A" & 1Row)
End Sub
I am receiving a Compile error: Expected: List separator or ). Do you have any ideas?
Dim wsA As Worksheet
Dim wsB As Worksheet
Dim lRow As Long
'~~> Set these to relevant sheets
Set wsA = Sheet3
Set wsB = Sheet4
'~~> Find last row in Sheet A
lRow = wsA.Range("A" & wsA.Rows.Count).End(xlUp).Row
'~~> Update formulas in Sheet B till relevant rows
wsB.Range("B2:W" & lRow).Formula = wsB.Range("B2:W2").Formula
Range("A2").AutoFill Destination:=Range("A2:A" & 1Row)
End Sub
I am receiving a Compile error: Expected: List separator or ). Do you have any ideas?