Results 1 to 5 of 5

Thread: countif (2003)

  1. #1
    3 Star Lounger
    Join Date
    Jan 2004
    Location
    Birmingham, West Midlands, United Kingdom
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts

    countif (2003)

    the formula
    =COUNTIF(data!$Y:$Y,"<b2")
    returns the wrong answer, 1, if the value in cell B2 is 18
    the formula =COUNTIF(data!$Y:$Y,"<18")
    returns the correct answer, 52 in my case.
    What am I doing wrong, please?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: countif (2003)

    You're counting cells whose value is less than the text string "b2", not cells whose value is less than that of cell B2.

    =COUNTIF(data!$Y:$Y,"<"&B2)

  3. #3
    3 Star Lounger
    Join Date
    Jan 2004
    Location
    Birmingham, West Midlands, United Kingdom
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: countif (2003)

    Once again, magic, Hans!
    I'd figured that there was someting iffy about my attempt at the formula, but Excel is often forgiving about cell references or static values.
    Please, how did you know the correct syntax for the formula which works? Once again, Help doesn't.
    Thanks again.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: countif (2003)

    I've been using Excel for so long now (I started with Excel 1.0 for the Macintosh in 1985!) that I can't remember when I first learned about this... <img src=/S/sorry.gif border=0 alt=sorry width=15 height=15>

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: countif (2003)

    And you're only 27 years old! <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

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