Hallliz999
New Member
- Joined
- Jun 5, 2018
- Messages
- 1
Hello,
I'm looking to create a macro of a complex formula that can be applied to excel and will drop down the formula in the cells where data is present.
I can do this very simply in excel but when I use the macro and additional or less data appears, the formula only work in the array of the recorded macro.
I am hoping to manually update the macro so it fills the formula depending on the data exported each time.
Below is a very basic example:
I believe I need to fix Range("C1:C114").Select
Please let me know if you can help!
Sub Macro1()
'
' Macro1 Macro
'
'
Range("C1").Select
ActiveCell.FormulaR1C1 = "=RC[-2]+RC[-1]"
Range("C1").Select
Selection.AutoFill Destination:=Range("C1:C114")
Range("C1:C114").Select
End Sub
I'm looking to create a macro of a complex formula that can be applied to excel and will drop down the formula in the cells where data is present.
I can do this very simply in excel but when I use the macro and additional or less data appears, the formula only work in the array of the recorded macro.
I am hoping to manually update the macro so it fills the formula depending on the data exported each time.
Below is a very basic example:
I believe I need to fix Range("C1:C114").Select
Please let me know if you can help!
Sub Macro1()
'
' Macro1 Macro
'
'
Range("C1").Select
ActiveCell.FormulaR1C1 = "=RC[-2]+RC[-1]"
Range("C1").Select
Selection.AutoFill Destination:=Range("C1:C114")
Range("C1:C114").Select
End Sub