+ Reply to Thread
Results 1 to 13 of 13

Average if not blank cells.

  1. #1
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    230

    Question Average if not blank cells.

    Hi

    I need average formula that doesn't take into account blank cells, some of the cells are blank because there is a formula in the cells that goes like this:
    =IF(OR(Parameters!F30="s",Parameters!F30="bc"),Parameters!I30,"")

    I think I can use averageif, but I don't know how to edit it to exclude "blank" cells.
    =AVERAGEIF(L7+P7+T7+X7+AB7)

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,899

    Re: Average if not blank cells.

    Maybe like this?

    =AVERAGE(L7,P7,T7,X7,AB7)

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,445

    Re: Average if not blank cells.

    Or the AVERAGEIF function including a <>"" condition?

  4. #4
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Average if not blank cells.

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


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  5. #5
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    230

    Re: Average if not blank cells.

    I just get an #value error on all of them. I can also not use L7:B7, as that contains cells with values that should not be taken into account. ONLY the cells L7+P7+T7+X7+AB7
    Last edited by excelnabb; 01-26-2019 at 09:10 AM.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Average if not blank cells.

    There may be something fishy about the 'numbers' - are they just text instead?

    Attach a sample workbook showing the problem. A small amount of data will do.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    230

    Re: Average if not blank cells.

    so cell x7 on day sheet
    Attached Files Attached Files

  8. #8
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Average if not blank cells.

    You can define name as price.
    Go to Name Manager > click New tab > Mention Name as Price > In Refers to enter =Day!$D$7,Day!$H$7,Day!$L$7,Day!$P$7,Day!$T$7 > Click on OK.
    In X7 formula :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  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: Average if not blank cells.

    Why are you adding the cells?

    What's wrong with the solution in post #2?

    Regards
    Click * below if this answer helped

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

  10. #10
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Average if not blank cells.

    Nothing wrong in post 2#.
    I just give another solution.

  11. #11
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Average if not blank cells.

    Use
    =AVERAGE(D7,H7,L7,P7,T7)

    or

    =AVERAGEIF($A$6:$T$6,"Price",$A7:$T7)
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  12. #12
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    230

    Re: Average if not blank cells.

    You guys are right, I didn't see that I had used + instead of ,
    Thank you!

  13. #13
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,445

    Re: Average if not blank cells.

    Seeing that your columns are equally spaced, there are shorter possibilities than entering every cell in your syntax (if there are many more)

+ 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. Average non-contiguous cells, ignore blank cells and avoid #DIV/0!
    By Davdef in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-06-2018, 10:03 AM
  2. Replies: 10
    Last Post: 04-25-2013, 06:12 PM
  3. Average the last 10 cells of a dynamic column but ignore blank cells & 0
    By mattadler22 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-13-2013, 11:37 PM
  4. [SOLVED] Average of last n number of cells NOT including blank cells
    By dsklein85 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-19-2013, 03:06 PM
  5. [SOLVED] find blank cells in column and average the cells below
    By desibabuji in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-03-2013, 12:03 PM
  6. Find a blank cell and calculate the average of all cells above till the next blank
    By joshnathan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2012, 11:51 AM
  7. Average of specified blank cells
    By magman1984 in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 11-10-2010, 05:31 AM

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