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
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

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,450
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")
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,699
Messages
5,833,206
Members
430,196
Latest member
rez5656

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top