Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 64
Default Calculating averages in sorted columns

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
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.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default Calculating averages in sorted columns

If you filter, that means some would be hidden , so use the 100+ range of
function_num

=SUBTOTAL(101,A1:A100)

--
__________________________________
HTH

Bob

"T. Valko" wrote in message
...
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.





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Calculating averages in sorted columns

Just so the OP isn't confused...

The 100 series arguments in SUBTOTAL are only available in versions of Excel
starting in Excel 2003. The 100 series will work on both filtered data *and*
data that is hidden as the result of manually hiding rows of data or hiding
rows through the use of macros.

=SUBTOTAL(1,A1:A100) works on *filtered* data only

=SUBTOTAL(100,A1:A100) works on both filtered data and data hidden manually

--
Biff
Microsoft Excel MVP


"Bob Phillips" wrote in message
...
If you filter, that means some would be hidden , so use the 100+ range of
function_num

=SUBTOTAL(101,A1:A100)

--
__________________________________
HTH

Bob

"T. Valko" wrote in message
...
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.







  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Calculating averages in sorted columns

Biff,

This is GREAT for the functions that SUBTOTAL supports. Is there anything
similar for COUNTIF (and other non math based functions) in filtered data?

Thanks!
Mike

"T. Valko" wrote:

Just so the OP isn't confused...

The 100 series arguments in SUBTOTAL are only available in versions of Excel
starting in Excel 2003. The 100 series will work on both filtered data *and*
data that is hidden as the result of manually hiding rows of data or hiding
rows through the use of macros.

=SUBTOTAL(1,A1:A100) works on *filtered* data only

=SUBTOTAL(100,A1:A100) works on both filtered data and data hidden manually

--
Biff
Microsoft Excel MVP


"Bob Phillips" wrote in message
...
If you filter, that means some would be hidden , so use the 100+ range of
function_num

=SUBTOTAL(101,A1:A100)

--
__________________________________
HTH

Bob

"T. Valko" wrote in message
...
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.







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating averages for subgroups PSmith Excel Discussion (Misc queries) 1 November 22nd 07 05:09 PM
Calculating Block Averages M.G. Excel Discussion (Misc queries) 5 January 15th 07 06:51 PM
Calculating weighted averages rgl Excel Discussion (Misc queries) 6 February 22nd 06 06:15 PM
calculating averages Golf Averages Excel Discussion (Misc queries) 1 August 15th 05 08:25 PM
calculating averages keving Excel Worksheet Functions 8 December 9th 04 01:23 AM


All times are GMT +1. The time now is 06:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"