+ Reply to Thread
Results 1 to 11 of 11

Excel 2007 : Count funtion

Hybrid View

  1. #1
    Registered User
    Join Date
    06-19-2008
    Posts
    7

    Count funtion

    Hi there,

    i really need help with this problem i am having. outlined below.

    --------------

    I have a list of cells, D32:D62. Each cell has a number in it.

    I have another cell, D6, that i use to get data from D32:D62
    In cell D6 i have a countif function to count every cell over or equal to the number 1.

    D6=COUNTIF(D32:D62,">=1")
    this reports to me that their are 22 values over or equal to no.1

    I now want D6 to do the same count but exclude the highest value in D32:D62

    I want it to return the number 21

    i can not add -1 after the equation ie (=COUNTIF(D32:D62,">=1")-1)
    because i need to use the output from d6 in another cells formula

    i also cant do
    COUNTIF(D32:D62,">=1")-MAX(D32:D62)

    that formula takes the number 22 and then subtracts the value of the actual highest cell. I.e. 22- 19. Which gives an output of 3.

    I dont want it to subtract the value of the cell from the overall count. I want it to not count it.



    Does anyone have the answer for this?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,706
    Perhaps try

    =COUNTIF(D32:D62,">=1")-(MAX(D32:D62)>=1)

  3. #3
    Registered User
    Join Date
    06-19-2008
    Posts
    7
    thanks!
    that works

    do you know how i would subtract the top 2 max numbers and top 3...

  4. #4
    Registered User
    Join Date
    06-19-2008
    Posts
    7
    last question!

    how do i use that formula (provided by daddylonglegs) but change it so it subtracts the highest 2 numbers.
    or the highest 3,4, or 5 numbers
    whichever i decide

    thanks!
    greatly appreciated

  5. #5
    Registered User
    Join Date
    06-19-2008
    Posts
    7
    anyone know this?
    it would be a big help
    thanks

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    How about:

    =COUNTIF(D32:D62,">=1")-(SUM((LARGE(D32:D62,ROW(INDIRECT("1:"&C1)))>=1)+0))

    where C1 contains the number of highest numbers to exclude.

    Note: This formula must be confirmed with CTRL+SHIFT+ENTER not just ENTER. You will see { } brackets appear around the formula.
    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.

+ 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