Solved

Multiple criteria using COUNT and IF

Posted on 2011-09-21
8
222 Views
Last Modified: 2012-05-12
Hi
Would you please check my attached excel sample file where I want to count the total of *Approved* in cell B:B of sheet Status where cell A:A match with the criteria(best001)
Result in cell A2 Sheet1 will be 8(those are colered in Green)
I added formulla in cell A2 only but it gave me 0.
Please advice where need to be change or modified.
It would be great if you update the attached file and send it back to me.
Thanks in advance for your understanding and co-operation.

Thanks

testcountif.xls
0
Comment
Question by:alam747
  • 4
  • 3
8 Comments
 
LVL 50

Expert Comment

by:teylyn
ID: 36578231
Hello,

in Excel 2007 and later you would be able to use Countifs, in 2003 and earlier you can use Sumproduct.

=SUMPRODUCT(--(NOT(ISERROR(FIND("best001",Status!$A$1:$A$38)))),--(Status!$B$1:$B$38="Approved"))

cheers, teylyn
0
 
LVL 50

Expert Comment

by:teylyn
ID: 36578276
The above will find any cell that contains "best001" AND has approved in the next cell. If you want to find an exact match for the text


Alpha"best001"

then you can also use

=SUMPRODUCT(--(Status!$A$1:$A$38="Alpha"&"""best001"&""""),--(Status!$B$1:$B$38="Approved"))

The quotation marks in the cell require the unusual formulation of the search string.

cheers, teylyn

0
 

Author Comment

by:alam747
ID: 36578314
Thanks for your prompt response, would you please send me the excel file with your update.
I am using office 2003.Not much familiar of excel formula.
Thanks for your understanding.

Thanks
0
 

Author Comment

by:alam747
ID: 36578339
Sorry, I will try the way you advised, and let you know if I face any problem. Please ignore my previous comment.
Thanks
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:alam747
ID: 36578393
Thanks a lot, it works only one thing I want to do is instead of specific line numbers(as you write $A$1: $A$38 same $B$1:$B38) how can I use like A:A and B:B to count as many lines in cell A and cell B have data to count .
Please advice how to do that.
I appreciate your prompt advice.

Thanks
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 36578852
Not for points.

You cannot do that in 2003. You have to specify a range, although you can use $A$2:$A$65536 for example. Better to use dynamic named ranges though: http://www.contextures.com/xlNames01.html#Dynamic

Regards,
Rory
0
 
LVL 50

Accepted Solution

by:
teylyn earned 500 total points
ID: 36579051
Hello,

please find in the attached file

- two dynamic range names for the Company and Status columns in the Status sheet
Company      =Status!$A$1:INDEX(Status!$A:$A,COUNTA(Status!$A:$A))
Status      =OFFSET(Company,0,1)

- an adjusted Sumproduct formula that uses these range names rather than fixed references

=SUMPRODUCT(--(NOT(ISERROR(FIND("best001",Company)))),--(Status="Approved"))

cheers, teylyn
testcountif.xls
0
 

Author Closing Comment

by:alam747
ID: 36694108
Thanks a lot, it helps....
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
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;…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

760 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

20 Experts available now in Live!

Get 1:1 Help Now