Use multiple criteria with COUNTIF: between dates and not blank

L

l.shields

Using Excel 2003 I need to count rows where the date in column A is in a
particular month and year and column G is not blank.
 
B

Bob Phillips

=SUMPRODUCT(--(G2:G20<>""),--(MONTH(A2:A20)=1))

for January

Note that SUMPRODUCT doesn't work with complete columns, you have to specify
a range.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Bob Phillips

oops, mis-read it. I see that now seeing Ardus' response.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
B

Bob Phillips

I'm actually East of Colorado!

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
L

l.shields

Many thanks guys for the very quick response. Worked perfectly. Sorry it
took me so long to reply, but I wasn't able to verify my e-mail address.
 
E

Eliza

Hello,

I have a similiar problem but I need to count the number of counts in EVERY
bin of a graph seperately. i.e. How many have an (x,y) of (0,0) (0,1)(1,0)
and so on. For the numbers I am talking about I need to do this several
thousand times and copying the formula below doesn't work because it changes
the column it's looking at every time copy to a new cell. Is there another
way that can be easily copied?

Thanks,

Eliza
 
N

Nascarfan88

I have a similar issue: I have a range of dates that I'm trackun using the
COUNTIF function based on the dates that are 91-180, 181-270, & 271-365, days
old, based on the TODAY date. for the 90-180days, I'm using the following,
but doesn't pan out:
=COUNTIF(MASTER!AI5:AI5997,">="&TODAY()-180),
(MASTER!AI5:AI5997,"<="&TODAY()-90)

Any help would be graetly appreciated!!

Keith
 
T

T. Valko

Try this:

=SUMPRODUCT(--(MASTER!AI5:AI5997>=TODAY()-180),--(MASTER!AI5:AI5997<=TODAY()-91))
 
N

Nascarfan88

Thanks much...That works great.
My dates are color coded, so how can I use the same formula, but only count
the dates in a specific color? Can this even be done?

Best regards
 
T

T. Valko

See if this gives you an idea...

Your dates are color coded for a reason. Use that reason as the logic in a
formula. If they're color coded using conditional formatting, use the same
logic of the conditional formatting rule to write a formula.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top