+ Reply to Thread
Results 1 to 5 of 5

Thread: Average? sub Average?

  1. #1
    Registered User
    Join Date
    11-11-2008
    Location
    WV
    Posts
    2

    Average? sub Average?

    I have a column of values.
    Example:
    38
    43
    77
    74
    42
    0
    0
    0
    0
    0
    I can average them at the bottom of the column with a formula... but the value is incorrect because it's also averaging all the 0's. Can you tell me how to get a subtotal of the cells that only have values in them? (The zeros have to be there because they are linked to another worksheet function.) I believe somewhere I may have to use absolute referencing... but I'm not certain where. Would it be sub averaging? Or am I barking up the wrong tree?
    Écrire, c'est une façon de parler sans être interrompu.

    Writing is a way to talk without being interrupted.

  2. #2
    Extremely Helpful member
    Join Date
    12-23-2006
    Location
    Belgium
    MS-Off Ver
    XL2003
    Posts
    6,127
    Hi and welcome to the board.
    Question answered lots of times on this forum ( the Search tool works very well)

    This being said try =average(if(a1:a10>0,a1:a10,false))

    Etntered as an arry forumula ( with ctrl+Shift+Enter)
    adapt the range to your needs
    Quoting entire posts clutters the forum and makes threads hard to read !

    If you are pleased with a member's answer then use the Star icon to rate it

    Click here to see forum rules

  3. #3
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2003, 2007, 2010
    Posts
    3,712

    Conditional average

    Using your posted data in A1:a11...here are two options:

    This is a regular formula:
    A12: =SUMIF(A2:A11,">0",A2:A11)/COUNTIF(A2:A11,">0")
    This is ARRAY FORMULA is shorter...BUT you must remember to commit it
    with CTRL+SHIFT+ENTER, instead of just ENTER:
    A12: =AVERAGE(IF(A2:A12>0,A2:A12))
    Does that help?
    Last edited by Ron Coderre; 11-12-2008 at 01:18 PM. Reason: tweak formula a bit
    Regards,

    Ron
    Microsoft MVP - Excel
    (Oct 2006 - Sep 2012)

    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    11-11-2008
    Location
    WV
    Posts
    2
    Yes!! thank you.
    I've been asking fellow Excellers to help me solve problems/issues. Sometimes I end up helping them... but this time I just wasn't getting my thoughts together.
    Thank you both. Next time I will look for the search tool, and try finding answers. I haven't used this kind of forum in 10 years. I've forgotten a lot about how it's used. If I keep coming back for answers I'll catch on.
    Thanks again, Arthurbr, and Ron
    Écrire, c'est une façon de parler sans être interrompu.

    Writing is a way to talk without being interrupted.

  5. #5
    Extremely Helpful member
    Join Date
    12-23-2006
    Location
    Belgium
    MS-Off Ver
    XL2003
    Posts
    6,127
    Glad to hrlp.If your problem is solved please change the original post's title prefix to " solved"
    thx
    Quoting entire posts clutters the forum and makes threads hard to read !

    If you are pleased with a member's answer then use the Star icon to rate it

    Click here to see forum rules

+ 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.2.0