GREATER OR EQUAL TO BUT LESS THAN Problem using Sumproduct

I

Iain Halder

Hi,

I have a list of ages of various patients from 18 to 65.

I'm breaking them into age groups and am using SUMPRODUCT.

=SUMPRODUCT((DATA!C2:C2500>=AA16)*(DATA!C2:C2500<=AA34)*(DATA!H2:H2500>=18<20))

C2:C2500 are date fields in format 01-Jan-05.
AA16 & AA34 are Start and Finish dates (months really).
H2:H2500 are the various ages.

AGE MONTH
<18 ?
18-20 ?
21-25 ?
26-30 ?
31-35 ?

.... and so on up to age greater than 65

The problem is the >=(age)<(age) bit ... how do I type this in
properly? I've tried a few variations which make sense to me but not,
alas, the computer.

Thank you for your help in this guys!

Iain
 
R

Ragdyer

Does this work for you:

=SUMPRODUCT((DATA!C2:C2500>=AA16)*(DATA!C2:C2500<=AA34)*(DATA!H2:H2500>=18)*
(DATA!H2:H2500<=20))

?
--
HTH,

RD
 
I

Iain Halder

Hi,

Yes, it does!

Just after I posted this I saw that all I had to do was duplicate the
form of the first two parts of the sumproduct - sometimes I'm a real
dummy!

My excuse is up all night and not enough coffee!!!

Thanks for the very quick reply there though.

Iain
 

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