Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    COUNTA function (2000)

    Problem: I have a row of cells (A1:AE1) that may or may not contain values. In each of the cells in row A2:AD2, I have the formula (using cell A1 as an example) "=If(A1<=>0,"Yes",""). At cell AE2, I want to count the number of cells in row A2:AD2 that contain a "Yes", but ignore the cells that contain nothing. When I use the COUNTA(A2:AD2) function in cell AE2, I get the number "31", even though I may only have values in, say, cells A2, A3, A4 and A5 (and, therefore, the answer in cell AE2 should be "4").
    Any help?
    Jeff

  2. #2
    Lounger
    Join Date
    Oct 2001
    Location
    Isleworth, Gtr London, England
    Posts
    28
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: COUNTA function (2000)

    Use

    =COUNTIF(A2:AD2,"=Yes")

    instead.

    Glenn.

  3. #3
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,055
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: COUNTA function (2000)

    The reason you were getting 31 is that the expresion "If(A1<=>0," basically says "if A1 is lesss than, or equal to, or greater than 0", in other words anything, and there are 31 columns from A to AE, inclusive.

    Hope this helps
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

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