ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   COUNTIF function (https://www.excelbanter.com/excel-discussion-misc-queries/239842-countif-function.html)

Mike

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.

Pete_UK

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.




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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com