Hello

I’ve been having some trouble in terms of using sumif only on the visible cells.
My data is currently laid out as follows:

Excel.PNG

What I'm trying to do is:
1) Filter column A so that only the blank cells are visible...

Excel1.PNG

2) Once the list has been filtered i need to use a sumif on the filtered range only & ensure that the value is populated in column A.
3) Any zero values in column A should lead onto the corresponding rows being deleted.



Unfortunately my formula carries out the sumif for everything in a range regardless of whether or not it is filtered.
This is just an extract of what I’m using:

HTML Code: 
Any ideas on what i can do to amend the code?

I understand some parts but i probably haven't mastered all of the basics (yet!)

Thanks