+ Reply to Thread
Results 1 to 16 of 16

how do you take the average of an entire column, eliminating fields that are blank

  1. #1
    Registered User
    Join Date
    03-14-2012
    Location
    lewisville, tx
    MS-Off Ver
    Excel 2000
    Posts
    25

    how do you take the average of an entire column, eliminating fields that are blank

    i have 35 rows. if only 5 have data, i need the average to just count the 5. right now it is averaging the blank fields as 0's.

    =AVERAGE(K5:K35) is the current formula
    Last edited by janastead; 03-16-2012 at 06:30 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: how do you take the average of an entire column, eliminating fields that are blank

    Hi Janastead,

    Use the following formula:-

    {=AVERAGE(IF(K5:K35>0,K5:K35,""))}

    Above is an array formula and need to be entered using Ctrl + Shift + Enter key combination. thanks


    Regards,
    DILIPandey
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    03-14-2012
    Location
    lewisville, tx
    MS-Off Ver
    Excel 2000
    Posts
    25

    Re: how do you take the average of an entire column, eliminating fields that are blank

    i tried it, and i received an error message about not being able to use an array in a merged cell. i removed the merge and now it just posts the formula in the cell itself as text instead of it becoming a formula. thank you for helping!

  4. #4
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: how do you take the average of an entire column, eliminating fields that are blank

    If the array is giving you trouble try:

    Please Login or Register  to view this content.
    Happy Excel'ing!

  5. #5
    Registered User
    Join Date
    03-14-2012
    Location
    lewisville, tx
    MS-Off Ver
    Excel 2000
    Posts
    25

    Re: how do you take the average of an entire column, eliminating fields that are blank

    Hmm. That one says too few arguments. Any other ideas? Thank you so much!

  6. #6
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: how do you take the average of an entire column, eliminating fields that are blank

    Try:

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  7. #7
    Registered User
    Join Date
    03-14-2012
    Location
    lewisville, tx
    MS-Off Ver
    Excel 2000
    Posts
    25

    Re: how do you take the average of an entire column, eliminating fields that are blank

    that one works PERFECT. Thank you! the only thing is, it is not counting zeros OR blanks and i need the zeros to count. is that possible?

    i have learned so much since joining this forum. i truley appreciate the help

  8. #8
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: how do you take the average of an entire column, eliminating fields that are blank

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-14-2012
    Location
    lewisville, tx
    MS-Off Ver
    Excel 2000
    Posts
    25

    Re: how do you take the average of an entire column, eliminating fields that are blank

    Again, I am learning so much. I changed the 0 to a -1 and it is working.

    =SUM(K5:K35)/COUNTIF(K5:K35,">"&0) changed to =SUM(K5:K35)/COUNTIF(K5:K35,">"&-1)

    Please let me know if you see any issues with the formula to the right. Thanks again!

  10. #10
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: how do you take the average of an entire column, eliminating fields that are blank

    Look at the code above, with your code, if you were to have a value like -0.5 then it would be taken into the average, but we are looking only for positive numbers. Your formula will work as long as there are no negative numbers, but just change the

    ">" to ">="

    which turns 'greater than' to 'greater than or equal to'

  11. #11
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: how do you take the average of an entire column, eliminating fields that are blank

    Hi

    Excuse me.....but what are you doing?

    First formula of DILIPandey, first of huru(a little modified) and of course ConneXionLost, work nicely.

    Am i missing something??
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

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

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  12. #12
    Registered User
    Join Date
    03-14-2012
    Location
    lewisville, tx
    MS-Off Ver
    Excel 2000
    Posts
    25

    Re: how do you take the average of an entire column, eliminating fields that are blank

    =sum(k5:k35)/countif(k5:k35,">="&0) and =SUM(K5:K35)/COUNTIF(K5:K35,">"&-1) are the 2 that worked for me. in your attachment the ones that yeilded 10 were not counting "0" the ones that work do. confusing for me, but i think i understand. thanks so much to everyone for the help!

  13. #13
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: how do you take the average of an entire column, eliminating fields that are blank

    ....If you say so... It's your project... But these 2 formulae, give the same result as(your first)ANERAGE formula...

    =AVERAGE(K5:K35)

    ...

  14. #14
    Registered User
    Join Date
    03-14-2012
    Location
    lewisville, tx
    MS-Off Ver
    Excel 2000
    Posts
    25

    Re: how do you take the average of an entire column, eliminating fields that are blank

    that one counted blanks as zero

  15. #15
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: how do you take the average of an entire column, eliminating fields that are blank

    I think what Fotis is trying to say is that the AVERAGE function does not count blanks, but does include zeros. It a little confusing why =AVERAGE(K5:K35) wouldn't work properly.

  16. #16
    Registered User
    Join Date
    03-14-2012
    Location
    lewisville, tx
    MS-Off Ver
    Excel 2000
    Posts
    25

    Re: how do you take the average of an entire column, eliminating fields that are blank

    lol, i must be doing something else wrong then. i'm sorry. hope the only one confused is me.

+ 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