Trouble with array formula, countif w/ multiple criteria examples provided

TXNCPO

New Member
Joined
Nov 1, 2011
Messages
23
Good Morning,

I am attempting to get the follwing to work, not much above novice user but I try, not sure this is even possible, working formula and purpose at bottom of post.

Couple of failed attempts, based on help on simpler issues and internet searches.

=SUM(COUNTIFS($A$10:$A$58, ("GREEN","N/A","UNKNOWN","YELLOW","RED")) + COUNTIFS($B$11:$B$58, ("GREEN","N/A","UNKNOWN","YELLOW","RED")))



=SUM(COUNTIFS(A10:A58,("GREEN","N/A","UNKNOWN","YELLOW","RED"), B11:B58,("GREEN","N/A","UNKNOWN","YELLOW","RED"))


I cut/paste from the notepad doc i'm building the formula in and then Cntrl +Shift + Enter.

I have about 3 other permitations of failed attempts, but you may get the jist.


PURPOSE

I am counting by word (i.e. GREEN) as opposed to color, all instances of these 5 words as a denomenator (bottom number) with the numerator count being GREEN, N/A, UNKNOWN to give me a readiness percentage. The formulas work, just trying to expand knowledge and see if a more better way to approach.


I have gotten the count to work with the formula below to give result i'm looking for

NUMERATOR in cell G3

=COUNTIF($A$10:$A$72,"GREEN") + COUNTIF($A$10:$A$72,"N/A") + COUNTIF($A$10:$A$72,"UNKNOWN") + COUNTIF($B$11:$B$57,"GREEN") + COUNTIF($B$11:$B$57,"N/A") + COUNTIF($A$10:$A$72,"UNKNOWN")



DENOMENATOR in cell G4 (counting all 5 words)

=COUNTIF($A$10:$A$58,"GREEN") + COUNTIF($A$10:$A$58,"N/A") + COUNTIF($A$10:$A$58,"UNKNOWN") + COUNTIF($A$10:$A$58,"YELLOW") + COUNTIF($A$10:$A$58,"RED") + COUNTIF($B$11:$B$58,"GREEN") + COUNTIF($B$11:$B$58,"N/A") + COUNTIF($A$10:$A$58,"UNKNOWN") + COUNTIF($B$11:$B$58,"YELLOW") + COUNTIF($B$11:$B$58,"RED")



formula in cell to give percentage.

=G3/G4


Thank you

R/ Joe
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,270
Office Version
365
Platform
Windows
Untested but try
=SUM(COUNTIFS($A$10:$A$58, {"GREEN","N/A","UNKNOWN","YELLOW","RED"}) + COUNTIFS($B$11:$B$58, {"GREEN","N/A","UNKNOWN","YELLOW","RED"}))
This is a normal formula, not an array formula
 
Last edited:

BlueHornet

Active Member
Joined
Apr 13, 2012
Messages
332
I'm not at all sure about what you're trying to finally achieve (this is why sample data can be helpful, along with "expected result"), but try this format to the formula:

=SUM( COUNTIF( A:A, {"Green","NA","Red","Yellow"})) + SUM( COUNTIF( B:B, {"Black","Brown","Unknown"}))
 

TXNCPO

New Member
Joined
Nov 1, 2011
Messages
23
Fluff,

worked purfectly, was even able to simply delete out yellow and red to get other number.

Thank you.

Now to go back and figure out what I was doing wrong. I think I got hung up on Sqiggly brackets = array
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,270
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

Forum statistics

Threads
1,082,145
Messages
5,363,384
Members
400,734
Latest member
sanpr

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top