I have a table which was created via Power Query. Works exactly like I want it except I want to total a few columns. If I do this manually by going to the first blank row and clicking on the Sigma icon, the cell contents are this:
=SUBTOTAL(109,[sls_amt])
My column name is of course sls_smt. When I filer the table, the results change as desired.
However in VBA as I attempt to create this formula with simple line of code:
I am getting "Runtime error 1004 application-defined or object-defined error". I know the desired cell is indeed active. Can anyone think of an alternate way of doing this? Or a change in my current code?
Macola Software Veteran and SAP Business One Consultant on Training Wheels
Check out our Macola tools:
=SUBTOTAL(109,[sls_amt])
My column name is of course sls_smt. When I filer the table, the results change as desired.
However in VBA as I attempt to create this formula with simple line of code:
Code:
ActiveCell.Formula = "=SUBTOTAL(109,[sls_amt])"
I am getting "Runtime error 1004 application-defined or object-defined error". I know the desired cell is indeed active. Can anyone think of an alternate way of doing this? Or a change in my current code?
Macola Software Veteran and SAP Business One Consultant on Training Wheels
Check out our Macola tools: