Good morning. I have a problem with sum in autofilter on my report in excel. I have a report for my curriculum in school. I used the formula =subtotal(9,xxx) every time that I filtered. I must to change the formula about the range. For example 1st time is =subtotal(9,a2:a8), 2nd is (9,a9:a20) and the range of cell is up to the curriculum and they are not constant. I would like some code or macro for summing the data after we filtered them.