View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
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.