+ Reply to Thread
Results 1 to 11 of 11

Countif with decimals to give a percentage..HELP!!

  1. #1
    Registered User
    Join Date
    09-30-2008
    Location
    Cheshire UK
    Posts
    9

    Countif with decimals to give a percentage..HELP!!

    Hi, This one sounds easy but I have spent a lot of time on it and no success. I have a list of students with various levels next to each name. EG: 4.5, 5.6, 5.7, 6.1 etc. From this range I want to work out the percentages of achiveing Level 5, 5 and above, Level 6, 6 and above. By doing a countif it counts 5 not 5.1 5.2 etc. How do I get over this? Attached is a sample. Thanks
    M
    Attached Files Attached Files
    Last edited by NBVC; 11-20-2008 at 10:39 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    What Countif() formulas are you using?

    =Countif(A2:A3,">=5") should count all values greater than or equal to 5.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    09-30-2008
    Location
    Cheshire UK
    Posts
    9

    Nearly there

    Hi, Thanks

    Yes that works for all level 5 or above but how do I then add an AND so its >=5 AND <6??

    M

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    =Countif(A2:A3,">=5")-Countif(A2:A3,">=6")

  5. #5
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Is this what you are trying to do?
    Attached Files Attached Files
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  6. #6
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    Hi,

    I think that the following will give you the required values.

    Level 5 =COUNTIF(A2:A23,"=5")/COUNT(A2:A23)*100
    Level 5+ =(COUNTIF(A2:A23,">5")-COUNTIF(A2:A23,"=6")-COUNTIF(A2:A23,">6"))/COUNT(A2:A23)*100
    Level 6 =(COUNTIF(A2:A23,"=6")/COUNT(A2:A23))*100
    Level 6+ =(COUNTIF(A2:A23,">6")/COUNT(A2:A23))*100
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  7. #7
    Registered User
    Join Date
    09-30-2008
    Location
    Cheshire UK
    Posts
    9

    Nearly

    Quote Originally Posted by oldchippy View Post
    Hi,

    Is this what you are trying to do?

    From the attached sample. The number of students achieving level 4 is 1, Level 5 is 15, level 6 is 6, LEvel 7 is 0. So the percentages that I worked out by hand are: Level 5 is 5%, Level 5+ is 95%, Level 6 is 6% and Level 6+ is 6% (as there are no Level 7 in the sample, however there could be)

    Thanks again!

    M

  8. #8
    Registered User
    Join Date
    09-30-2008
    Location
    Cheshire UK
    Posts
    9

    Does not work sorry

    Quote Originally Posted by NBVC View Post
    =Countif(A2:A3,">=5")-Countif(A2:A3,">=6")
    By doing that you will minus the result of all students level 5 or above minus the students who are level 6 and above.

    Thanks I am sure we are nearly there!

    m

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by mrhogan View Post
    By doing that you will minus the result of all students level 5 or above minus the students who are level 6 and above.

    Thanks I am sure we are nearly there!

    m
    Which will leave students between..

  10. #10
    Registered User
    Join Date
    09-30-2008
    Location
    Cheshire UK
    Posts
    9

    sorry no

    Quote Originally Posted by sweep View Post
    Hi,

    I think that the following will give you the required values.

    Level 5 =COUNTIF(A2:A23,"=5")/COUNT(A2:A23)*100
    Level 5+ =(COUNTIF(A2:A23,">5")-COUNTIF(A2:A23,"=6")-COUNTIF(A2:A23,">6"))/COUNT(A2:A23)*100
    Level 6 =(COUNTIF(A2:A23,"=6")/COUNT(A2:A23))*100
    Level 6+ =(COUNTIF(A2:A23,">6")/COUNT(A2:A23))*100
    For your level 5 it returns only those cells with 5 not 5.1,5.2 etc.
    Thanks

    M

  11. #11
    Registered User
    Join Date
    09-30-2008
    Location
    Cheshire UK
    Posts
    9

    Thanks Done it!

    Thanks all. This gives me my solution:

    Level 5: =COUNTIF($A$2:$A$23,">=5")-COUNTIF($A$2:A$23,">=6")
    Level 5+: =COUNTIF($A$2:$A$23,">=5")
    Level 6: =COUNTIF($A$2:$A$23,">=6")-COUNTIF($A$2:A$23,">=7")
    Level 6+: =COUNTIF($A$2:$A$23,">=6")

    The only thing is when I added /count(A2:A23) it did not work, I think its working out something before doing something else??? Anyway got all the numbers working, now I just need to apply it to the 150 live student levels!

    M

+ 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