+ Reply to Thread
Results 1 to 14 of 14

Formula for finding an average number, excluding blank cells

  1. #1
    Registered User
    Join Date
    01-31-2018
    Location
    London
    MS-Off Ver
    2013
    Posts
    32

    Formula for finding an average number, excluding blank cells

    Hi again,

    I have a table of numbers that I am finding the average for, thanks so my last post I have successfully got a formula that works for this table to find the average =AVERAGE (d52,d62,d72,d82), however some of my collumns do not have data in currently and when I add the formula I get #DIV/0!
    This data will change over time, so I need to find a formula that excludes the blanks and does not count them as '0'.
    Can anyone help?
    thank you

  2. #2
    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,482

    Re: Formula for finding an average number, excluding blank cells

    Try AVERAGEIFS with a criterion to exclude blanks ("<>"):

    https://support.office.com/en-ie/art...8-f7c5c3001690
    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.

  3. #3
    Registered User
    Join Date
    01-31-2018
    Location
    London
    MS-Off Ver
    2013
    Posts
    32

    Re: Formula for finding an average number, excluding blank cells

    Thank you, I tried what you suggested: =Averageifs(D44,D52,D59,D67)(">0") and I get an error saying I have used to many arguments.
    Have I done something wrong?

  4. #4
    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,482

    Re: Formula for finding an average number, excluding blank cells

    You need to use a range:

    =AVERAGEIFS(average_range,criteria_range_1,criteria_1,etc.)

    Attach the workbook if you are struggling.

  5. #5
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Formula for finding an average number, excluding blank cells

    What logic are you trying to apply? Your cells are non-contigeous? If so:

    =AVERAGEIF(INDIRECT({"D44","D52","D59","D67"}),">0")

  6. #6
    Registered User
    Join Date
    01-31-2018
    Location
    London
    MS-Off Ver
    2013
    Posts
    32

    Re: Formula for finding an average number, excluding blank cells

    I have tried those formulas, however I am still getting an error.
    I have attached the workbook.
    You will see I am trying to put the formula in column G.
    Step 1- average shows in G7
    Step 2- average shows in G15
    Step 3- average shows in g22
    Step 4- average shows in g30

    I would like to ignore '0' and blanks as part of the formula and find the average between those cells that are populated 1-5.

    thank you.
    Attached Files Attached Files

  7. #7
    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,482

    Re: Formula for finding an average number, excluding blank cells

    I think getting the cell references right might help!

    =AVERAGEIF(INDIRECT({"D7","D15","D22","D30"}),">0")

    However, I am not clear what exactly you are attempting. Should the value in G7 be an average of just Step 1 values? Or something else?

  8. #8
    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,482

    Re: Formula for finding an average number, excluding blank cells

    You could use this for Step 1:

    =AVERAGEIFS($C$3:$C$31,$C$3:$C$31,">0",$A$3:$A$31,"Group Status")

  9. #9
    Registered User
    Join Date
    01-31-2018
    Location
    London
    MS-Off Ver
    2013
    Posts
    32

    Re: Formula for finding an average number, excluding blank cells

    The cell references were correct previously, I had to copy into a separate workbook to get rid of personal data.
    Yes G7 shows an average of Step 1 values
    G15, an average of Step 2 values.

  10. #10
    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,482

    Re: Formula for finding an average number, excluding blank cells

    Try this in G7 drag copied down:

    =IF(A7="","",SUMPRODUCT($C$3:$F$31*($A$3:$A$31="Group Status")*(TRIM($C$2:$F$2)=H7))/SUMPRODUCT(($C$3:$F$31>0)*($A$3:$A$31="Group Status")*(TRIM($C$2:$F$2)=H7)))
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    01-31-2018
    Location
    London
    MS-Off Ver
    2013
    Posts
    32

    Re: Formula for finding an average number, excluding blank cells

    Thank you. DO you know how I get it to update automatically, without having to click within the formula?
    I tried Refreshing All Data and that didn't work.
    thanks for your help.

  12. #12
    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,482

    Re: Formula for finding an average number, excluding blank cells

    It sounds as if you have switched calculations to manual - it should update without intervention. Check on the Formulas ribbon - Calculation Options.

  13. #13
    Registered User
    Join Date
    01-31-2018
    Location
    London
    MS-Off Ver
    2013
    Posts
    32

    Re: Formula for finding an average number, excluding blank cells

    Ignore my previous message, I have worked out how to do it :-) thank you.

  14. #14
    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,482

    Re: Formula for finding an average number, excluding blank cells

    No worries!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Replies: 7
    Last Post: 05-04-2017, 10:53 AM
  2. [SOLVED] Smallest number in group, excluding blank cells
    By ssminnow in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-16-2017, 03:06 PM
  3. Formula for finding number of consecutive blank cells over a year - See info!
    By oldtauntonian in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-16-2013, 08:31 AM
  4. !HELP! how to count the number of records excluding blank cells
    By eksel_101 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-21-2012, 11:28 PM
  5. Moving average excluding blank cells
    By bog3494 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-28-2011, 07:18 PM
  6. Replies: 4
    Last Post: 07-25-2011, 02:18 PM
  7. Average function excluding blank cells
    By jacko311 in forum Excel General
    Replies: 0
    Last Post: 10-24-2009, 01:48 PM

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