Hello
I have a sumifs formula as part of a macro code.
ActiveCell.Formula = _
"=SUMIFS(N$12:N$" & ListEnd & ", $A$12:$A$" & ListEnd & ",""Non EU"",$B$12:$B$" & ListEnd & ",""="" & M706)"
This works perfectly, but cell M706 could be higher or lower depending on the data within the report each time it is run, hence using ListEnd.
I tried replacing & M706 with & RC[-1] when running it stops with error Application-Defined or Object-Defined error.
Can someone point out where I have made the mistake or how I can change the formula so it works.
Thanks in advance.
coop123
I have a sumifs formula as part of a macro code.
ActiveCell.Formula = _
"=SUMIFS(N$12:N$" & ListEnd & ", $A$12:$A$" & ListEnd & ",""Non EU"",$B$12:$B$" & ListEnd & ",""="" & M706)"
This works perfectly, but cell M706 could be higher or lower depending on the data within the report each time it is run, hence using ListEnd.
I tried replacing & M706 with & RC[-1] when running it stops with error Application-Defined or Object-Defined error.
Can someone point out where I have made the mistake or how I can change the formula so it works.
Thanks in advance.
coop123