Solved

excel formula

Posted on 2011-03-07
10
253 Views
Last Modified: 2012-05-11
I need to create a formula in excel that provides results only if 2 criteria are met in 2 different columns.  I curently use the following formula: =COUNTIF(CMA_Report!C1:C296,"John Doe") .   what formula can I use so that both criteria oreven 3 criteria, if met, will provide me with results (an item count on a table).
0
Comment
Question by:sburgoin
[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
  • 6
  • 2
  • 2
10 Comments
 
LVL 33

Expert Comment

by:jppinto
ID: 35060892
=COUNTIF(CMA_Report!C1:C296,AND("John Doe","Joe Harris")
0
 
LVL 33

Expert Comment

by:jppinto
ID: 35060904
=COUNTIF(CMA_Report!C1:C296,AND("John Doe","Joe Harris"))
0
 

Author Comment

by:sburgoin
ID: 35060909
what if it's in a different column all together?
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 33

Expert Comment

by:jppinto
ID: 35060911
Was missing an ) at the end...
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 35060923
Try COUNTIFS (with an "S"), e.g.

=COUNTIFS(CMA_Report!C1:C296,"John Doe",CMA_Report!D1:D296,4)

that would count rows where column C contains the name John Doe and column D contains a 4

regards, barry
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35060937
I don't believe you can use an AND like that in COUNTIF jp,

sburgoin, see my suggestion above for two criteria in two columns

barry
0
 
LVL 33

Expert Comment

by:jppinto
ID: 35060954
You can use a SUMPRODUCT() function, something like this:

=SUMPRODUCT((CMA_Report!C1:C296="John Doe")*(Sheet1!D1:D296="Joe Harris")*(CMA_Report!E1:E296="Test"))

jppinto
0
 
LVL 33

Expert Comment

by:jppinto
ID: 35060993
Barry is right, COUNTIF can't be used with an AND...sorry, I wasn't thinking properly. But the SUMPRODUCT can be an alternative to COUNTIFS()...
0
 
LVL 33

Expert Comment

by:jppinto
ID: 35061052
What version of Excel are you using? If it's prior to Excel 2007 you don't have COUNTIFS() function, you need to do it using SUMPRODUCT() function...
0
 

Author Closing Comment

by:sburgoin
ID: 35061788
got what I needed.  thanks!
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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

728 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