?
Solved

CountIf with comparison criteria

Posted on 2012-03-15
3
Medium Priority
?
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 24

Assisted Solution

by:StephenJR
StephenJR earned 500 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 500 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
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 in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

770 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