+ Reply to Thread
Results 1 to 3 of 3

GREATER OR EQUAL TO BUT LESS THAN Problem using Sumproduct

  1. #1
    Iain Halder
    Guest

    GREATER OR EQUAL TO BUT LESS THAN Problem using Sumproduct

    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

    >o< Rescued Cats & Kittens Needing Homes >o<
    >o< www.celiahammond.org >o<
    >o< www.cat77.org.uk >o<


  2. #2
    Ragdyer
    Guest

    Re: GREATER OR EQUAL TO BUT LESS THAN Problem using Sumproduct

    Does this work for you:

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

    ?
    --
    HTH,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "Iain Halder" <[email protected]> wrote in message
    news:[email protected]...
    > 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<2
    0))
    >
    > 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
    >
    > >o< Rescued Cats & Kittens Needing Homes >o<
    > >o< www.celiahammond.org >o<
    > >o< www.cat77.org.uk >o<



  3. #3
    Iain Halder
    Guest

    Re: GREATER OR EQUAL TO BUT LESS THAN Problem using Sumproduct

    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

    On Wed, 28 Sep 2005 21:39:24 -0700, "Ragdyer" <[email protected]>
    wrote:

    >Does this work for you:
    >
    >=SUMPRODUCT((DATA!C2:C2500>=AA16)*(DATA!C2:C2500<=AA34)*(DATA!H2:H2500>=18)*
    >(DATA!H2:H2500<=20))
    >
    >?


    >o< Rescued Cats & Kittens Needing Homes >o<
    >o< www.celiahammond.org >o<
    >o< www.cat77.org.uk >o<


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1