View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Calculating averages in sorted columns

You want to use the SUBTOTAL function.

Look in help for SUBTOTAL. It has many variations depending on your needs.
For example, to get an average of filtered data in the range A1:A100 -

=SUBTOTAL(1,A1:A100)

--
Biff
Microsoft Excel MVP


"Nathan" wrote in message
...
Hi,

I have a spreadsheet of a survey I conducted with teachers at various
schools. Across row 3 I have Name, School, and then all of the questions.
In
row 4 down, I have all of the data. In row 2 I would like to calculate
averages for all of the answers. I am sorting (through auto filter) the
data
by school, and would like to enter an average formula that adjusts every
time
I sort by a different school. I think this uses an IF function, but am not
sure. Any thoughts?

Thanks, Nathan.