"How to Use a VBA Macro to Sum Only Visible Cells" which seems exactly what you need. Try the SUBTOTAL function before trying the code, I should say.

A problem might be that the line containing the total is not visible due to the Autofilter. Then you should use this formula's on a second sheet, I think.

Hope this helps.