Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default SUBTOTAL function to average column without blanks

I can use the SUBTOTAL command with the 101 function to average only visable
cells in a filtered list.
However how can I exclude empty cells from being included in the average?
I can do this with an "array formula", e.g.
{=AVERAGE(IF(P3:P60<0, P3:P60,""))}
but not with a filtered list using visable cells only.
Any help appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default SUBTOTAL function to average column without blanks

I take it you mean a list where rows have been manually hidden, instead
of filtered. In any case, the SUBTOTAL function ignores empty cells.
Or do you want an average that excludes zeros. If so, try the following
formula, which needs to be confirmed with CONTROL+SHIFT+ENTER...

=AVERAGE(IF(SUBTOTAL(102,OFFSET(P3:P60,ROW(P3:P60)-ROW(P3),0,1)),IF(P3:P6
0 0,P3:P60)))

Hope this helps!

In article ,
Campbell wrote:

I can use the SUBTOTAL command with the 101 function to average only visable
cells in a filtered list.
However how can I exclude empty cells from being included in the average?
I can do this with an "array formula", e.g.
{=AVERAGE(IF(P3:P60<0, P3:P60,""))}
but not with a filtered list using visable cells only.
Any help appreciated.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default SUBTOTAL function to average column without blanks

Cheers Domenic,
Thank you so much - you solved my problem, although I'll have to work on it
a bit to fully understand why!
FYI, I didn't have manually hide rows, they were only hidden by the filter.
The filter selected items from one column, and the corresponding amounts that
I wished to average were in another column, which included some blank cells.
Keep up the excellent work!

"Domenic" wrote:

I take it you mean a list where rows have been manually hidden, instead
of filtered. In any case, the SUBTOTAL function ignores empty cells.
Or do you want an average that excludes zeros. If so, try the following
formula, which needs to be confirmed with CONTROL+SHIFT+ENTER...

=AVERAGE(IF(SUBTOTAL(102,OFFSET(P3:P60,ROW(P3:P60)-ROW(P3),0,1)),IF(P3:P6
0 0,P3:P60)))

Hope this helps!

In article ,
Campbell wrote:

I can use the SUBTOTAL command with the 101 function to average only visable
cells in a filtered list.
However how can I exclude empty cells from being included in the average?
I can do this with an "array formula", e.g.
{=AVERAGE(IF(P3:P60<0, P3:P60,""))}
but not with a filtered list using visable cells only.
Any help appreciated.


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
Need some comments on my Utility_Move class module. jchen Excel Worksheet Functions 0 August 21st 06 07:05 PM
Fill Function to next Column shital shah Excel Worksheet Functions 0 August 16th 06 02:53 PM
Average Function (include Blank Cells and Zeros) [email protected] Excel Discussion (Misc queries) 17 June 27th 06 01:33 PM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
"Average" function query Robin Blackwell Excel Worksheet Functions 3 October 3rd 05 09:22 PM


All times are GMT +1. The time now is 02:06 PM.

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"