I Have this formula

=SUMIF(Accounting!G5:G267,Sheet10!A4,Accounting!AA5:AA267)


I'd like to drag it down, but keep the G5, and the AA5 the same all the way down, and the rest can go down according to the references. How would I do this?


If I try and copy it, I can almost get the desired result, except i NEED the A4 to go down according to reference, which doesn't happen if I copy and paste.

Any help is appreciated, thanks!