SUMPRODUCT within set dates

T

Tom

Hello,

I have some data that I need to count based on two criteria.
The tab name for the data is "nd".
The first two characters of column B shows the market ID. I then need it to
go to column EC and count what dates are in october, november, december and
2010 and beyond.

This is the formula I've been using, but I can't get the date format correct:

=SUMPRODUCT(-(LEFT(nd!$B:$B,2)="BD"),-(nd!$EC:$EC>=10/1/2009<10/31/2009))

Can someone tell me how I should be entering in the date?

Thanks,
Tom
 
M

Mike H

Tom,

1 way

=SUMPRODUCT((LEFT(ND!$B1:$B5,2)="BD")*(ND!$EC1:$EC5>=DATE(2009,10,1)*(ND!$EC1:$EC5<DATE(2009,10,31))))

Mike
 
T

T. Valko

count what dates are in october, november,
december and 2010 and beyond.
=SUMPRODUCT(-(LEFT(nd!$B:$B,2)="BD"),-(nd!$EC:$EC>=10/1/2009<10/31/2009))

Your formula doesn't match your explanation. Your formula is attempting to
only count for the month of OCT 2009 yet your explanation says you want to
count from OCT 2009 going forward.

To count from OCT 2009 going forward:

Try this:

=SUMPRODUCT(--(LEFT(nd!$B:$B,2)="BD"),--(nd!$EC:$EC>=DATE(2009,10,1)))

To count only for OCT 2009:

=SUMPRODUCT(--(LEFT(nd!$B:$B,2)="BD"),--(TEXT(nd!$EC:$EC,"mmyyyy")="102009"))

I assume you're using Excel 2007 in order to reference the entire columns?
 
P

Peo Sjoblom

Try



=SUMPRODUCT(--(LEFT(nd!$B1:$B10000,2)="BD"),--(nd!$EC1:$EC10000>=DATE(2009,10,1)),--(nd!$EC1:$EC10000<DATE(2009,10,31)))


I assume you are using 2007 since you are using B:B but I would refrain from
using that for 2 reasons, your workbook will become very slow and if you
ever save this in 97-2003 format the formula will return a NUM error
when someone with <=2003 opens it

--


Regards,


Peo Sjoblom
 

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