+ Reply to Thread
Results 1 to 9 of 9

Working out a percentage if the number is above

  1. #1
    Forum Contributor
    Join Date
    09-23-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    346

    Working out a percentage if the number is above

    Evening,

    I would appreciate any help you can give on this please:

    In column JT I have a number of values ranging from: -5 to 5 and the odd blank box.

    What I would like is a formula which will add up all the times a value of 3 or higher is in the column and then divide that by the number of times there is a value in the column, e.g. not including blanks.

    Many thanks

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Working out a percentage if the number is above

    Try:

    =COUNTIF(JT:JT,">=3")/COUNTA(JT:JT)

  3. #3
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094

    Re: Working out a percentage if the number is above

    Hi,

    Try this.

    =SUMIF(JT1:JT9,">"&3,JT1:JT9)/COUNTA(JT1:JT9)

    If your blank cells have formulas in them this will not work though. You could use:

    =SUMIF(JT1:JT9,">"&3,JT1:JT9)/(COUNTA(JT1:JT9)-COUNTBLANK(JT1:JT9))

    HTH
    Steve

  4. #4
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094

    Re: Working out a percentage if the number is above

    Sorry thought you wanted to SUM the times. Switch the sumif to the countif.

    =COUNTIF(JT1:JT9,">3")/(COUNTA(JT1:JT9)-COUNTBLANK(JT1:JT9))

    Steve

  5. #5
    Forum Contributor
    Join Date
    09-23-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Working out a percentage if the number is above

    Thanks for the help guys, but still a few problems:

    I'm using SteveG's:

    =SUMIF(Predicted!JT4:Predicted!JT140,">"&3,Predicted!JT4:Predicted!JT140)/(COUNTA(Predicted!JT4:Predicted!JT140)-COUNTBLANK(Predicted!JT4:Predicted!JT140))

    but at there are formulas in the blank I tried to amend it to:

    =COUNTIF(Predicted!JT4:Predicted!JT140,">"&3,Predicted!JT4:Predicted!JT140)/(COUNTA(Predicted!JT4:Predicted!JT140)-COUNTBLANK(Predicted!JT4:Predicted!JT140))

    but now it comes up with a argument error. Any ideas please?

    Cheers

  6. #6
    Valued Forum Contributor
    Join Date
    03-25-2004
    Location
    Boston, MA US
    Posts
    1,094

    Re: Working out a percentage if the number is above

    Hi,

    Change the "COUNTIF(Predicted!JT4:Predicted!JT140,">"&3,Predicted!JT4:Predicted!JT140" to "COUNTIF(Predicted!JT4:JT140,">3")". You don't need the range again after the ">3".

    HTH
    Steve

  7. #7
    Forum Contributor
    Join Date
    09-23-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Working out a percentage if the number is above

    Many thanks, I am now using:

    =COUNTIF(Predicted!JT4:JT140,">=3")/(COUNTA(Predicted!JT4:Predicted!JT140)-COUNTBLANK(Predicted!JT4:Predicted!JT140))

    I now have two more steps to do:

    What I would like is a formula which will add up all the times a value of 3 or higher is in the column and then divide that by the number of times there is a value in the column, e.g. not including blanks. - but it to only do this is the value of C6 is in column C.

    Any ideas please.

  8. #8
    Forum Expert DGagnon's Avatar
    Join Date
    02-23-2012
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2003, 2007
    Posts
    1,645

    Re: Working out a percentage if the number is above

    Try this:

    =COUNTIFS(Predicted!JT4:JT140,">=3",Predicted!C4:C140,C6)/(COUNTA(Predicted!JT4:Predicted!JT140)-COUNTBLANK(Predicted!JT4:Predicted!JT140))
    If you liked my solution, please click on the Star -- to add to my reputation

    If your issue as been resolved, please clearly state so and mark the thread as [SOLVED] using the thread tools just above the first post.

  9. #9
    Forum Contributor
    Join Date
    09-23-2010
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    346

    Re: Working out a percentage if the number is above

    Thanks for this, I've figured a slight problem, I have used:

    =COUNTIFS(Predicted!JT$4:JT$140,">=3",Predicted!B$4:B$140,Lookups!C2)/(COUNTA(Predicted!JT$4:Predicted!JT$140)-COUNTBLANK(Predicted!JT$4:Predicted!JT$140))

    However, this is now causing problems because it is dividing the figure by the number of times there is a figure in JT, not counting the blanks which have formulas in. I actually need it to divide by the number of times there is a figure in JT, not counting the blanks which have formulas in, if the value in column B is C2.

    Any ideas please.

    Many thanks for all the help.
    Last edited by Cmorgan; 03-07-2012 at 04:17 AM.

+ 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