Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 128
Default Ignore zero in subtotal formula

I have the following formula whice averages the cells in column G. However,
some of those cells show a zero, which I would like to ignore. What would I
need to add to my formula to accommodate this?

=SUBTOTAL(1,G:G)

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Ignore zero in subtotal formula

Try this:

=SUM(G:G)/COUNTIF(G:G, "<0")

This sums the entire column, but only divides it by the non-zero
cells, thus giving a true average.

Thanks,
Rachel Garrett
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Ignore zero in subtotal formula

Sarah,

You can ignore the count of zeros with the array formula
COUNT(IF(array0,array)). Use that as your denominator and the SUM function
as the numerator. You can do the same thing by using Subtotal functions, one
for the numerator and one for the denominator. Hope this helps.

"Sarah (OGI)" wrote:

I have the following formula whice averages the cells in column G. However,
some of those cells show a zero, which I would like to ignore. What would I
need to add to my formula to accommodate this?

=SUBTOTAL(1,G:G)

Thanks in advance

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
Ignore zero in column for subtotal michaelberrier Excel Discussion (Misc queries) 3 August 1st 07 02:56 PM
how can I ignore or hide the #N/A when doing a sum or subtotal? Jules73 Excel Worksheet Functions 4 March 21st 07 10:20 PM
Ignore #N/A in a formula [email protected] Excel Discussion (Misc queries) 1 February 14th 07 03:16 PM
Ignore #N/A in a formula [email protected] Excel Discussion (Misc queries) 3 February 14th 07 06:02 AM
How can I ignore an #N/A value in a =SUM() formula? JD Excel Worksheet Functions 2 February 13th 06 04:50 PM


All times are GMT +1. The time now is 09:27 PM.

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

About Us

"It's about Microsoft Excel"