Solved

CountIf with comparison criteria

Posted on 2012-03-15
3
385 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
ID: 37727019
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
ID: 37727216
Array formula
=SUM((A1:Z1>A2:Z2)*1)

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

Author Closing Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

910 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

21 Experts available now in Live!

Get 1:1 Help Now