#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default COUNTIF function

I have a row of prices, i.e. D14 through P14 are prices for individual weeks,
which I want to find an average of, however depending upon how I filter the
report some weeks have a price of $0.00. Is there a way I can do something
like sum D14 through D27 then divide by a count of those weeks where prices
are greater than 0?

I am thinking that I can do something like this:
=SUM(D14:P14)/COUNTIF(D14:P14,***0)

but I do not know what *** should be?? I am entering this formula in Q14 so
I cannot reference the whole row because of the cyclical reference problem.
I don't know if this is relevant info, just trying to be thorough in my
explanation...Any suggestions?

Thanks for your help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default COUNTIF function

Nearly right. Try this:

=SUM(D14:P14)/COUNTIF(D14:P14,"0")

Hope this helps.

Pete

On Aug 15, 8:08*pm, Mike wrote:
I have a row of prices, i.e. D14 through P14 are prices for individual weeks,
which I want to find an average of, however depending upon how I filter the
report some weeks have a price of $0.00. *Is there a way I can do something
like sum D14 through D27 then divide by a count of those weeks where prices
are greater than 0?

I am thinking that I can do something like this:
=SUM(D14:P14)/COUNTIF(D14:P14,***0)

but I do not know what *** should be?? *I am entering this formula in Q14 so
I cannot reference the whole row because of the cyclical reference problem. *
I don't know if this is relevant info, just trying to be thorough in my
explanation...Any suggestions? *

Thanks for your help.


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
Countif Function VLH Excel Discussion (Misc queries) 1 May 15th 08 11:05 PM
countif function charles Excel Worksheet Functions 4 July 25th 06 11:36 PM
please help how to combine IF function with Countif function Dinesh Excel Worksheet Functions 6 March 30th 06 08:28 PM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
Embed a countif function in subtotal function? Stuck at work Excel Worksheet Functions 1 February 14th 06 03:19 AM


All times are GMT +1. The time now is 02:18 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"