Hi, I have a sheet of raw data that is produced from a userform, which then goes through to a worksheet as static data. The user can change data (i/e the percentage of the sale to revenue) but as there are no formulas there, I made this option to click.
The problem I'm having is it only copies the formula to L3, when I want it to copy down the whole range (which changes in length).
I'm reasonably new to coding from scratch, so any tips would be appreciated.
Thanks
Matt
Sub RecalculateRevenue()
Dim myRange As Range
Set myRange = Range("L3")
myRange.Select
myRange.FormulaR1C1 = "=RC[-2]*RC[-1]"
myRange.Copy
myRange.End(xlDown).Select
ActiveSheet.Paste
End Sub
The problem I'm having is it only copies the formula to L3, when I want it to copy down the whole range (which changes in length).
I'm reasonably new to coding from scratch, so any tips would be appreciated.
Thanks
Matt
Sub RecalculateRevenue()
Dim myRange As Range
Set myRange = Range("L3")
myRange.Select
myRange.FormulaR1C1 = "=RC[-2]*RC[-1]"
myRange.Copy
myRange.End(xlDown).Select
ActiveSheet.Paste
End Sub