Solved

CountIf with comparison criteria

Posted on 2012-03-15
3
384 Views
Last Modified: 2012-06-27
Hi,

I have the need to count all numbers in a range where the value in the cell is greater then the cell next to it.

Esentially, for the range a1:z:1
evaluate if a1>a2, count, if not...skip and move move onto
evaluate if b1>b2, count ect.....

Any help is appreciated.
0
Comment
Question by:MCaliebe
3 Comments
 
LVL 24

Assisted Solution

by:StephenJR
StephenJR earned 125 total points
Comment Utility
Do you mean you want to count the number of times a number in row 1 is greater than row 2? If so, try this array formula so use Ctrl+Shift+Enter instead of just enter:

=SUM(IF(A1:Z1>A2:Z2,1))
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 125 total points
Comment Utility
Array formula
=SUM((A1:Z1>A2:Z2)*1)

Non array formula
=SUMPRODUCT((A1:Z1>A2:Z2)*1)
0
 

Author Closing Comment

by:MCaliebe
Comment Utility
Thank you both.  I appreciate seeing both styles of writing this formula.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now