Solved

excel formula

Posted on 2011-03-07
10
250 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
  • 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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

17 Experts available now in Live!

Get 1:1 Help Now