Results 1 to 5 of 5

Thread: COUNTIF

  1. #1
    Star Lounger
    Join Date
    May 2007
    Location
    Cape Town, Western Cape, South Africa
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi, i have data in one column where i have to count the number of grades, i tried countif and it worked but the problem comes to repetition. It shows that i have for example, 4 people for Grade B1 but if the next row has B1, it will show it as 3. see attached
    Attached Files Attached Files

  2. #2
    Plutonium Lounger Medico's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    12,631
    Thanks
    161
    Thanked 936 Times in 856 Posts
    I have never used countif, but in looking at your formulas in the D column, D2 shows =COUNTIF(C2:C9,C2), D3 shows =COUNTIF(C3:C10,C3), but if you check, there is no data in C10. I think you may have to rework your formulas. Same thing occurs in D4 and so forth. Excel believes that even if you copy a formula to another cell it should update the cells the data occurs in, and this is not always the case. I hope this helps.
    BACKUP...BACKUP...BACKUP
    Have a Great Day! Ted


    Sony Vaio Laptop, 2.53 GHz Duo Core Intel CPU, 8 GB RAM, 320 GB HD
    Win 8 Pro (64 Bit), IE 10 (64 Bit)


    Complete PC Specs: By Speccy

  3. #3
    Star Lounger
    Join Date
    May 2007
    Location
    Cape Town, Western Cape, South Africa
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi

    I can make C9 absolute, thanx will play around.
    Attached Files Attached Files

  4. #4
    3 Star Lounger
    Join Date
    Feb 2003
    Location
    Runcorn, Cheshire, United Kingdom
    Posts
    372
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by svokozela View Post
    Hi, i have data in one column where i have to count the number of grades, i tried countif and it worked but the problem comes to repetition. It shows that i have for example, 4 people for Grade B1 but if the next row has B1, it will show it as 3. see attached
    Yes, it's what Ted has said.

    You can correct the problem by changing the formula in D2 to =COUNTIF(C$2:C$9, C2) and then dragging down. An alternative would be to make C2:C9 a Named Range (such as "Grades") and using the Named Range in the Countif, =COUNTIF(Grades,C2) then drag down.

  5. #5
    Star Lounger
    Join Date
    May 2007
    Location
    Cape Town, Western Cape, South Africa
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks it worked!!

Posting Permissions

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