Need help with nested AND or IF in a count

wmatthai

New Member
Joined
Jul 26, 2010
Messages
4
So I have been trying different COUNTIF and DCOUNT, and SUM(IF and I am at wits end... it seems so simple, yet if it was in a DB I would have it figured out in seconds...

So Here is my issue

I need a formula that First looks for values in C9:C18 that have any type of data AND has a string value of "Not Run" in L9:L18

So I first started with =COUNTIF(C9:C18,"="&"*") Works great for the first part
Then =COUNTIF(L9:L18,"Not Run") works great for second part... but cant seem to figure out how to nest and AND in there. I tried +COUNTIF(AND( and that didnt work...

Then I played around with DCOUNT(C9:L18,"Not Run" and that wouldnt pull back the right data either. Most likely my inexperience with the syntax

Lastly I tried =COUNT(IF(C9:C18="*",1,0),IF(L9:L18="Not Run",1,0))

I seriously think I am confusing myself now and would be very happy if you pointed me in the right direction...

Thanks

Will
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

=SUMPRODUCT(--(C9:C18<>""),--(L9:L18="Not Run"))
 

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,271
Try something like this...
=SUMPRODUCT((C9:C18<>"")*(L9:L18="Not Run"))

Or this if you have Excel 2007 or later
=COUNTIFS(C9:C18,"<>",L9:L18,"Not Run")
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,994
Messages
5,514,679
Members
409,014
Latest member
evenyougreg

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top