+ Reply to Thread
Results 1 to 13 of 13

averaging the 10 lowest values in 25 number data set while ignoring zero values

  1. #1
    Registered User
    Join Date
    09-02-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    averaging the 10 lowest values in 25 number data set while ignoring zero values

    I know the averaging formula which ignores zeros in a data set =AVERAGEIF(AA3:AX3,"<>0") and the formula for the 10 lowest numbers in a data set is =AVERAGE(SMALL(A1:A20,ROW(1:10))). What I need to know is how do you combine these two formulas?

  2. #2
    Valued Forum Contributor
    Join Date
    09-15-2011
    Location
    Chennai, India
    MS-Off Ver
    Excel 2010
    Posts
    436

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    Please try this file.
    Attached Files Attached Files
    Please click 'Add reputation', if my answer helped you.

  3. #3
    Registered User
    Join Date
    09-02-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    pyeman1952.xls

    Thanks Ramanan, as you can see from attached file my data is ordered differently--I tried changing the formula but it did not work?? Any ideas?

  4. #4
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    =AVERAGE(SMALL(IF(A27:Y27<>0,A27:Y27),ROW(1:10)))

    Press ctrl+shift+enter, not just enter

  5. #5
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    in the given solution of raman change z to y
    and it's array formula,you don't intentionally type the braces you have to hold down "CRTL" , "SHIFT" then hit Enter.... you'll notice the braces there if done right.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  6. #6
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    Quote Originally Posted by vlady View Post
    in the given solution of raman change z to y
    and it's array formula,you don't intentionally type the braces you have to hold down "CRTL" , "SHIFT" then hit Enter.... you'll notice the braces there if done right.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    No need an extra 1*(INDEX() and also no need to put '+' sign in front the AVERAGE.

    See post #4
    Last edited by Teethless mama; 09-03-2013 at 10:14 PM.

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

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    Quote Originally Posted by Teethless mama View Post
    =AVERAGE(SMALL(IF(A27:Y27<>0,A27:Y27),ROW(1:10)))

    Press ctrl+shift+enter, not just enter
    Using ROW(1:10) leaves the formula vulnerable to row insertions.

    Better to use:

    =AVERAGE(SMALL(IF(A27:Y27<>0,A27:Y27),{1,2,3,4,5,6,7,8,9,10}))

    Or:

    =AVERAGE(SMALL(IF(A27:Y27<>0,A27:Y27),ROW(INDIRECT("1:10"))))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    Yes I know.
    in the given solution of raman change z to y
    just for the sake of the given solution of raman on why it did not work.
    issue is
    array entered and range is incorrect.

    @ tony.. it's much better than row().

  9. #9
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    Quote Originally Posted by vlady View Post
    Yes I know.

    just for the sake of the given solution of raman on why it did not work.
    issue is
    array entered and range is incorrect.

    @ tony.. it's much better than row().
    Really?

    ROW(INDIRECT("1:10")) is a volatile formula which is most of us try to avoid.

  10. #10
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    i'm referring to tony no 1 WITHOUT the ROW()

    @ tony.. it's much better than row().
    the second one still have the ROW(INDIRECT) as i mentioned on my quote above.

  11. #11
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    Quote Originally Posted by vlady View Post
    i'm referring to tony no 1 WITHOUT the ROW()



    the second one still have the ROW(INDIRECT) as i mentioned on my quote above.
    What if OP want Average the 50 or 100 lowest values ignore '0'
    so his formula become like this

    =AVERAGE(SMALL(IF(A27:Y27<>0,A27:Y27),{1,2,3,4,5,6,7,8,9,10...........................................................................................................................................................................................................50}))

    or he will use his volatile formula as I mention in the previous post. Are they really better than 'ROW(1:50)'

  12. #12
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    then that's the problem --> use array formula but being aware of what tony pointed out when he gave the formulas(since the range is too many)or use the volatile formula which as you said is most of us try to avoid.
    Using ROW(1:10) leaves the formula vulnerable to row insertions.

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

    Re: averaging the 10 lowest values in 25 number data set while ignoring zero values

    ...he will use his volatile formula as I mention in the previous post. Are they really better than 'ROW(1:50)'
    Yes.

    Don't be affraid of volatile functions!

    Yes, if you have 1000's of formulas that use volatile functions they MIGHT slow things down. The only way to know for sure is to test it and see. Using a couple hundred or dozens of volatile functions will not impact performance.

    If you can use an array constant then use that as your 1st choice.

    If you know for certain that you will NEVER need to insert new rows then ROW(...) is acceptable. However, you should let the OP know how the formula would be impacted by inserting new rows at certain locations.

    For example, if you insert a new row 1 then the formula becomes:


    =AVERAGE(SMALL(IF(A28:Y28<>0,A28:Y28),ROW(2:11)))

    That causes the formula to average the wrong values.

    It doesn't make any difference if you make the rows absolute:

    =AVERAGE(SMALL(IF(A27:Y27<>0,A27:Y27),ROW($1:$10)))

    Insert a new row 1 and the formula still becomes:

    =AVERAGE(SMALL(IF(A28:Y28<>0,A28:Y28),ROW($2:$11)))

+ 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. Substract column values with lowest number among them
    By shyam100379 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-22-2013, 02:06 AM
  2. Replies: 9
    Last Post: 07-19-2012, 07:16 AM
  3. Excel 2007 : Averaging number & letter values
    By RobinHolly in forum Excel General
    Replies: 5
    Last Post: 07-29-2010, 01:41 PM
  4. How can I average certain number of lowest values in a column?
    By Philcw in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 09-13-2005, 01:05 PM
  5. [SOLVED] Find x number of lowest values from a 200 x 200 matrix
    By Grotifant in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-23-2005, 10:06 PM

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