Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Sep 2002
    Location
    Birmingham, England
    Posts
    123
    Thanks
    0
    Thanked 0 Times in 0 Posts

    countif and? (97SR2, 2000)

    Sorry, brain out of gear....
    I have a named range called _age which contains, guess what? - people's ages [dynamic, coming from a formula involving now()]
    I want to count the numbers of folks within certain intervals of ages, using a formula saying something like
    =countif(_age,AND(_age>18,_age<=28)
    For the life of me I can't find a syntax which works.
    Doing the AND bit in a separate column and counting the TRUE values works, but is scarcely elegant!

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: countif and? (97SR2, 2000)

    =Countif(_age,">18") - countif(_age,">28")

    The first parts counts >18,
    The 2nd counts >28
    The difference is the >18 and <=28

    Steve

  3. #3
    2 Star Lounger
    Join Date
    Sep 2002
    Location
    Birmingham, England
    Posts
    123
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: countif and? (97SR2, 2000)

    Thanks very much, Steve!
    Said my brain was out of gear, and trying to make it too hard!
    Happy Christmas!

Posting Permissions

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