Solved

count row in excel if = to 2 conditions

Posted on 2011-02-11
3
338 Views
Last Modified: 2012-08-13
I need to count row P in my excel spreedsheet if row H > 17 and row P = 1 or 3.  

How can I write the query to do this in and excel field.

thanks
0
Comment
Question by:running32
[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 59

Accepted Solution

by:
Saurabh Singh Teotia earned 500 total points
ID: 34874349

Use this formula...

=SUMPRODUCT((H1:H100>17)*(P1:P100=1)+(P1:P100=3))

Please adjust ranges as per your data...

Saurabh...
0
 

Author Closing Comment

by:running32
ID: 34874498
thank you for the quick answer
0
 
LVL 12

Expert Comment

by:Amick
ID: 34874592
Assuming the range is 1,2,3 then try
=COUNTIFS(H1:H9999,"= 17",P1:P9999,"<4")-COUNTIFS(H1:A9999,"= 17",P1:P9999,"=2")
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

751 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