colindickson
01-07-2022, 05:33 AM
Hi,
I have the following code to copy a formula forward to the next blank column and hard paste the previous one:
Sub RollColumn() Dim UsdCols As Long
UsdCols = Cells(2, Columns.Count).End(xlToLeft).Column
With Range(Cells(2, UsdCols), Cells(76, UsdCols))
.Copy .Offset(, 1)
.Value = .Value
End With
End Sub
Is it possible to change the row 76 in the range to the last used row in that range?
Thanks
I have the following code to copy a formula forward to the next blank column and hard paste the previous one:
Sub RollColumn() Dim UsdCols As Long
UsdCols = Cells(2, Columns.Count).End(xlToLeft).Column
With Range(Cells(2, UsdCols), Cells(76, UsdCols))
.Copy .Offset(, 1)
.Value = .Value
End With
End Sub
Is it possible to change the row 76 in the range to the last used row in that range?
Thanks