+ Reply to Thread
Results 1 to 14 of 14

Count the number of cells' values higher than X%

  1. #1
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Count the number of cells' values higher than X%

    Greetings to all.

    Attached Excel (already) contains formula to assess conditioned % movers (between given number of cells).

    I need the cells count next to successful X% movers (in the Excel, its of 4%).

    Please refer the attached image for more explanation.

    Count.png

    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Re: Count the number of cells' values higher than X%

    I just need the cells count next to the percentage calculated cells.

    Example:
    Alpha row:
    Column J is the recent % calculated cell.
    Col K > Col J => Count is 1
    Col L > Col J => Count is 2

    Result:
    Col N of Alpha row -> 2

    Can somebody help me, please.

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Count the number of cells' values higher than X%

    This solution uses three helper columns, which may be hidden for aesthetic purposes. The first helper column gives the number of columns that needs to be added to the address of the first cell in 'Last Group' for that row. The array entered formula* that does this is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    *Array entered formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    The second helper column uses the following formula to find the first cell of the range whose values are to be compared:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The third helper column uses the following formula to find the last cell of the range whose values are to be compared:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Column N is then populated with the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  4. #4
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Re: Count the number of cells' values higher than X%

    Jete, I appreciate your response to the query.

    What does this mean {1,2,3,4} in the below formula..?

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Note: 5 cells is a range where the range is dynamic (for instance 10, 12, 15, 20..)

  5. #5
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Re: Count the number of cells' values higher than X%

    Quote Originally Posted by JeteMc View Post
    This solution uses three helper columns, which may be hidden for aesthetic purposes. The first helper column gives the number of columns that needs to be added to the address of the first cell in 'Last Group' for that row. The array entered formula* that does this is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    *Array entered formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    The second helper column uses the following formula to find the first cell of the range whose values are to be compared:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    The third helper column uses the following formula to find the last cell of the range whose values are to be compared:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Column N is then populated with the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Pete, seems like I miss getting right output. Can you please help.
    Data.png

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Count the number of cells' values higher than X%

    @Leslie

    Please don't quote whole posts -- it's just clutter. If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding

    For normal conversational replies, try using the QUICK REPLY box below.

    Please attach the workbook so that your attempt to use the formulae can be looked at. A screenshot tells us very little.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Re: Count the number of cells' values higher than X%

    @Ali, thanks.

    May I know how to attach an Excel while replying back.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Count the number of cells' values higher than X%

    It's exactly the same as it was when you attached a file to your opening post.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  9. #9
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Re: Count the number of cells' values higher than X%

    Here is the Excel for reference:
    Attached Files Attached Files

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Count the number of cells' values higher than X%

    The {1,2,3,4} counts the four cells in 'Last Group'. When you run Evaluate Formula in any cell P2:P12 you see that the last four cells in the five cell range are compared to the first four, 'First Group'.
    I am not seeing an error with the zeroes being displayed in N5:N12 based on the directions given in the picture attached to post #1. Even though the formula in column P identifies a change of more than 4% in each of those rows, there are no subsequent cells with a larger value, as was the case with the alpha row.
    Let me know if you have any questions.

  11. #11
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Re: Count the number of cells' values higher than X%

    Quote Originally Posted by JeteMc View Post
    The {1,2,3,4} counts the four cells in 'Last Group'...
    @JeteMc I should have been more clear. Excel file, which I uploaded in the recent reply, when updated with higher value (next to the percentage calculated cells values) the right count value does not get shown.
    I mean, please update cells next to percentage calculated cells with higher numbers (randomly). Right count not shown.
    May I kindly request to look-in (I may be wrong somewhere, please correct me).

    Quote Originally Posted by LesliePrabakar View Post
    ...Note: 5 cells is a range where the range is dynamic (for instance 10, 12, 15, 20..)...
    @JeteMc If 5 is the range then no need to change the formula as its already {1,2,3,4}. What if the range is 12, 20..? Can this {1,2,3,4} be automatically formula written..

    Help appreciated.
    Thanks,
    Leslie Prabakar Ruphas Vanathuraj

  12. #12
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Count the number of cells' values higher than X%

    As to point number one, looking at the gamma row there are two places, within the 'Last Group', where the percent increase is greater than 4%. Since the first of these is highlighted I assume that the count should commence from that point. To that end exchange the function SUMPRODUCT with SMALL.
    As to point number two, if the range is changed then there will need to be a change in the OFFSET based formula that names the range as 'Last Group'. I would suggest doing both by putting a number in a cell, say T1, and referencing that cell in both formulas. The updated, now array entered, formula* to populate column Q and feed the range on to the COUNTIFS formula in column N is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    *Array entered formulas are activated by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    I am going to leave it to you to test with other sized ranges.
    Let me know if you have any questions.
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    02-22-2015
    Location
    India
    MS-Off Ver
    MS Office 2007
    Posts
    100

    Re: Count the number of cells' values higher than X%

    @JeteMc
    Thanks so much for your response.

    I still see the constant number (5) from the below formulas.

    Can you please look-in and help (like did in the above reply for adding-up a cell for feeding range):

    Name: FirstGroup (Name Manager)
    Refers to: =OFFSET('% CALC WITH CONDITION'!$A2,,COUNT('% CALC WITH CONDITION'!$B2:$M2)-1,,-5+1)


    Name: LastGroup (Name Manager)
    Refers to: =OFFSET('% CALC WITH CONDITION'!$A2,,COUNT('% CALC WITH CONDITION'!$B2:$M2),,-5+1)

  14. #14
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,567

    Re: Count the number of cells' values higher than X%

    First Group: =OFFSET('% CALC WITH CONDITION'!$A2,,COUNT('% CALC WITH CONDITION'!$B2:$M2)-1,,-'% CALC WITH CONDITION'!$T$1)
    Last Group: =OFFSET('% CALC WITH CONDITION'!$A2,,COUNT('% CALC WITH CONDITION'!$B2:$M2),,-'% CALC WITH CONDITION'!$T$1)
    Let me know if you have any questions.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to select and count cells with value higher than 0.00
    By Schalk in forum Excel General
    Replies: 4
    Last Post: 08-28-2015, 06:35 AM
  2. How do I make Excel count values higher than 2 as 2
    By Zack96 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-02-2015, 02:03 AM
  3. [SOLVED] Comparing two columns and returning the number of cells in one column with higher values
    By heresteve2 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-08-2014, 01:06 PM
  4. Count number of times one value is higher than another IF criteria is true
    By LasseKaa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-17-2013, 11:28 AM
  5. Counting cells that contain number higher than 1
    By jimmisavage in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-08-2013, 05:52 AM
  6. Replies: 2
    Last Post: 05-31-2010, 03:23 PM
  7. Replies: 7
    Last Post: 03-22-2010, 05:22 PM

Tags for this Thread

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