Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COUNTIF and SUMIF in Excel 2

Status
Not open for further replies.

Mark2Aus

Technical User
Oct 6, 2004
52
AU
I need help as I can't get this right.
I want to count how many prices in a large range (C17:C3215) are higher than the average price of the range and I also want to calculate the average price of those prices above the average price of the range.

I thought I knew!!

My formula =COUNTIF(C17:C3215,">AVERAGEA(C17:C3215)") returns zero. Why?
The same with =SUMIF(C17:C3215,">AVERAGEA(C17:C3215)").
I know we can use both functions when the criteria is text or values, but can't we use them when the criteria is another function or a formula?
Thanks
Mark
 
With

=COUNTIF(C17:C3215,">AVERAGEA(C17:C3215)")

Try removing the " " - as this means its text rather the the averagea function so...

=COUNTIF(C17:C3215,>AVERAGEA(C17:C3215))

----------------------------------------
There are 2 types of computer, the prototype and the obsolete!!
 
Hi Mark2Aus,

The COUNTIF Function does want a string argument for the criteria, but you want that string to include the result of the AVERAGEA Function.

You must build the string up with the literal ">" and average, ...

[blue][tt] =COUNTIF(C17:C3215,[/tt][red][tt]">"[/tt][/red][green][tt]&[/tt][/green][purple][tt]AVERAGEA(C17:C3215)[/tt][/purple][tt])[/tt][/blue]

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
thanks Tony

...valuable lesson re-learned! :)

have a STAR!
 
Thanks, jonsi, most kind!

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top