View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default Adding only the filtered results


spartikus411 wrote:
i have tons of info with about 10 columns, when i use the autofilter, i
want to add the values in a column but only the filtered ones. how can
i do this?
thank you in advance


--
spartikus411


Instead of using =SUM(range) you should use =SUBTOTAL(9,range). With
this, only the displayed values are totalled. I would suggest that you
put these formulae on the top row by inserting a new row 1, so that
they are always visible when you apply the filter (set Window | Freeze
Panes), and this means you don't have to keep scrolling to the bottom.

If you already have =SUM formulae, then you can change them over by
highlighting them and doing Find and Replace (CTRL-H):

Find What: SUM(
Replace With: SUBTOTAL(9,

then click Replace All. If they are on the bottom row, you can do a cut
and paste to put them on the top row.

Hope this helps.

Pete