Solved

COUNTIFS Function not adding multiple results

Posted on 2013-01-07
7
440 Views
Last Modified: 2013-01-07
I am trying to use the COUNTIFS to state multiple criteria within a range to count.  Can someone look at the attached example and tell me what might be wrong with my formula>  I assume that

=COUNTIFS(J6:AM6,"I*", J6:AM6,"P*")
is going to count all cells in a range begining with I or P.

Additionally, can the Count functions be used to determine what does not meet a criteria such as... count everything in range J6:AM6 except "I*" and "P*"

Thanks,

MC
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
7 Comments
 
LVL 10

Expert Comment

by:etech0
ID: 38751207
Countifs will count all records that fulfill BOTH conditions. To achieve what you need, try this:

=COUNTIF(J6:AM6,"I*")+COUNTIF(J6:AM6,"P*")
0
 

Author Comment

by:MCaliebe
ID: 38751227
Thank you.  The help file is missing that statement.

Can you look at my second question..I edited it most likely as you were answering.
0
 
LVL 10

Accepted Solution

by:
etech0 earned 150 total points
ID: 38751235
For this one, you'd probably need to use countifs.

Try this:

=COUNTIFS(J6:AM6,"<>I*", J6:AM6,"<>P*")

What it's doing is counting all the records where it doesn't start with I and it doesn't start with P. The rule is that Countifs uses AND, so if you want OR, you need to add (like above).
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 13

Expert Comment

by:Shanan212
ID: 38751237
To count all that begins with i* or p*
=COUNTIF(J6:AM6,"i*")+COUNTIF(J6:AM6,"P*")

Open in new window


To count all that does not begin with i* or p*
=COUNTIFS(J6:AM6,"<>i*",J6:AM6,"<>P*")

Open in new window

0
 

Author Closing Comment

by:MCaliebe
ID: 38751247
Great explanation.
0
 
LVL 10

Expert Comment

by:etech0
ID: 38751253
Glad to help!
0
 
LVL 24

Expert Comment

by:Steve
ID: 38751254
you can use SUM(COUNTIF(J6:AM6,{"I*","P*"})) entered with [ctrl]+[shift]+[enter]

then you can put multiple criteria in between the {}.
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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