Show if between two dates

L

Lise

Hi everyone

I am trying to count that if the name in T21 is anywhere in column D and the
corresponding cell in column A is between the 01/01/2010 and the 31/01/2010

I have written the following but its not working - where am I falling down
please?

=SUMPRODUCT(($D$2:$D$618=T21)*($A$2:$A$618>=01/01/2010,<31/01/2010))

Thanks as always

Lise
 
T

T. Valko

=SUMPRODUCT(($D$2:$D$618=T21)*($A$2:$A$618>=01/01/2010,<31/01/2010))

Use cells to hold the date boundaries.

F1 = lower date boundary
G1 = upper date boundary

=SUMPRODUCT(--($D$2:$D$618=T21),--($A$2:$A$618>=F1),--($A$2:$A$618<G1))
 
F

Fred Smith

To Excel, 01/01/2010 in a formula means 1 divided by 1 divided by 2010. If
you want a date, you need to say so, as in:
=SUMPRODUCT(($D$2:$D$618=T21)*($A$2:$A$618>=DATE(2010,1,1))*($A$2:$A$618<DATE(2010,1,31)))

Regards,
Fred
 

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