+ Reply to Thread
Results 1 to 22 of 22

Min max removed

  1. #1
    Registered User
    Join Date
    10-24-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    8

    Wink Min max removed

    Hi can anyone tell me how count the cells with numbers but ignore the cells with the min and max values and the same to ignore the second large and small value thanks

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Min max removed

    If this was your data:

    Data Range
    A
    2
    1
    3
    1
    4
    2
    5
    3
    6
    4
    7
    5
    8
    5


    What results do you expect?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Min max removed

    Hi,

    This will sum A1:A10 excluding both the maximum and minimum values in that range (assuming the maximum and minimum values are unique within that range - you don't say what should be the result if there is more than one maximum or minimum):

    =SUMPRODUCT(LARGE(A1:A10,ROW(INDIRECT("2:"&ROWS(A1:A10)-1))))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Min max removed

    Something like:

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


    committed with Ctrl-Shift-Enter rather than just Enter.

    You'll see:

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




    Regards, TMS
    Last edited by TMS; 02-16-2014 at 03:21 PM.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Min max removed

    Sorry, Tony. Didn't refresh before posting and so didn't see your post.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Min max removed

    Quote Originally Posted by XOR LX View Post
    Sorry, Tony. Didn't refresh before posting and so didn't see your post.
    No problem!

    We need to hear back form the OP.

    They ask for a count:

    ...tell me how count the cells with numbers...
    But your formula is doing a sum.

  7. #7
    Registered User
    Join Date
    10-24-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Min max removed

    In this I would want to see count of 5 and if was to include the second part of large and small a count of 3

    However I need to also count the numbers below a value so eg the value is 3 so I have 3 cells their but need to ignore the previous section I.e min , and small so my count will 1
    So FBI had 44 values I would be left with 40 cells being counted and if I had any cell value which in the case brought up 17 were lower but I had to ignore min and small so this would mean I have 15 lower

    Pain in the butt I know thanks for your help

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Min max removed



    How about this...

    Post a SMALL sample file and tell us / show us what cells should be counted.

  9. #9
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Min max removed

    Definitely a case where we need to see a sample workbook!!

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Min max removed

    Seems like you have several requirements. Unfortunately, at this moment in time, only you know what the data looks like and what your expected outcomes are.

    We can't guess at this ...

  11. #11
    Registered User
    Join Date
    10-24-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Min max removed

    EXCEL FORUM HELP.xlsHi guys hope this helps you hlep me

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Min max removed

    well the first bit for average is
    =(SUM(B2:B58)-SUM(LARGE(B2:B58,{1,2}),SMALL(B2:B58,{1,2})))/(COUNT(B2:B58)-4)
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Min max removed

    I don't understand how you can have a "number below minimum"

  14. #14
    Registered User
    Join Date
    10-24-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Min max removed

    This is a requirement for an item to be passed if it's lower than min value it is removed as not for purpose

  15. #15
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Min max removed

    Still confused.

    You have all those formulas at the bottom of column B causing circular references.

    Maybe someone else will be able to figure it out.

  16. #16
    Registered User
    Join Date
    10-24-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Min max removed

    Hi just used them to do the calculation they are hidden normally and the cells at the top are visible this it to tidy up the form as you only have a third of it

  17. #17
    Registered User
    Join Date
    10-24-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Min max removed

    thanks for any help

  18. #18
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Min max removed

    Doesn't matter if they're hidden, they'll still cause circular references.

  19. #19
    Registered User
    Join Date
    10-24-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    8

    Re: Min max removed

    Okay just on the requirements I need and ignoring that area could you help with any of the information I need cheers

  20. #20
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Min max removed

    Sum of two largest:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    = 1124

    Sum of two smallest:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    = 11

    Sum of all entries:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    = 4035

    Sum of all entries less two largest and two smallest:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    = 2900

    Count of all entries:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    = 44

    Count of all entries less two largest and two smallest:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    = 40

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



    Regards, TMS
    Last edited by TMS; 02-16-2014 at 06:53 PM.

  21. #21
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,440

    Re: Min max removed

    Number less than minimum:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Or, with a cell reference:
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS

  22. #22
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Min max removed

    Excel has a specific function to exclude "outliers" from an average - TRIMMEAN function. You can use that function like this to exclude the top two and bottom two,

    =TRIMMEAN(B2:B59,4/COUNT(B2:B59))
    Last edited by daddylonglegs; 02-16-2014 at 07:19 PM.
    Audere est facere

+ 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. If Contains To Be Removed
    By marko737 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-02-2014, 06:27 PM
  2. (Removed)
    By rkoenig in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-09-2011, 01:44 AM
  3. removed
    By billykiller05 in forum Excel General
    Replies: 1
    Last Post: 05-12-2009, 02:32 PM
  4. why has my post been removed???!!!!!!!
    By deeppurple247 in forum Excel General
    Replies: 1
    Last Post: 03-04-2007, 02:36 PM
  5. How Is CHOOSESHEET.XLA Removed?
    By kghexce in forum Excel General
    Replies: 2
    Last Post: 01-10-2006, 05:46 AM

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