I need your help. I am writing this small piece of code in VBA to use in a an RPA proces. I have tested my formula in Excel and it works, but everytime when i try to run it from VBA it crashes with error-code 1004 and tells me the problemn is in code .Range("C29").Formula = "=SUMIF(Sheet1!$A$19:$A$1000;$B29;Sheet1!$G$19:$G$1000)".
Changed the formula to simplere formulas and that works fine. Anybody else who knows this issue?
Sub FillDown()
Dim strFormulas '(1 To 3) As Variant
With ThisWorkbook.Sheets("MainSheet")
.Range("C29").Formula = "=SUMIF(Sheet1!$A$19:$A$1000;$B29;Sheet1!$G$19:$G$1000)"
.Range("C29:C501").FillDown
End With
End Sub