+ Reply to Thread
Results 1 to 10 of 10

Average/Sum Ignoring Blanks In-Range Help

  1. #1
    Registered User
    Join Date
    01-30-2023
    Location
    California
    MS-Off Ver
    Excel 365
    Posts
    4

    Average/Sum Ignoring Blanks In-Range Help

    Hello,

    I am trying to figure out a formula that can take the average of the separate sums of a few ranges of cells. But the catch is that I need the function to completely ignore any range that has all blank cells.

    Using the calendar template as a foot-traffic counter, I need the average of Mondays, Tuesdays, Wednesday, Thursday, & Fridays to be counted as they are input in each week. The catch is that I don't want the week to be counted in the average if ALL cells in that week are blank.

    I've tried a billion formulas over the past few days, and my latest effort is this:
    =AVERAGE((IF(COUNTA(B11:C19) > 0, SUM(B11:C19), "")),(IF(COUNTA(B22:C30) > 0, SUM(B22:C30), ""))).

    I hope this isn't too confusing, and I appreciate any advice.
    Attached Files Attached Files
    Last edited by Metapotamus; 01-30-2023 at 08:45 PM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,361

    Re: Average/Sum Ignoring Blanks In-Range Help

    Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file and a mocked up solution.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Average/Sum Ignoring Blanks In-Range Help

    Try:
    =AVERAGE(SUM(B11:B19),SUM(B22:B30))

    if incorrect, please supply a sample file, meeting the guidelines shown at the top of the screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    01-30-2023
    Location
    California
    MS-Off Ver
    Excel 365
    Posts
    4

    Re: Average/Sum Ignoring Blanks In-Range Help

    Thanks for the heads up, I've attached it

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Average/Sum Ignoring Blanks In-Range Help

    Your file appears to be protected and is therefore useless to us. Please refer to the formula/file attached at mt last reponse.

  6. #6
    Registered User
    Join Date
    01-30-2023
    Location
    California
    MS-Off Ver
    Excel 365
    Posts
    4

    Re: Average/Sum Ignoring Blanks In-Range Help

    My mistake, I've reattached the unprotected file, and rewrote my question based on the file.

  7. #7
    Registered User
    Join Date
    01-30-2023
    Location
    California
    MS-Off Ver
    Excel 365
    Posts
    4

    Re: Average/Sum Ignoring Blanks In-Range Help

    So, I thought this should be the answer, but it returns 0, and I need it return "NULL" or something along those lines... because I'm counting foot traffic, I don't want future weeks, or weeks to even be counted in the average

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,361

    Re: Average/Sum Ignoring Blanks In-Range Help

    The sheets are still protected so it is not possible to select cells with formulae to check and/or update/replace them.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Average/Sum Ignoring Blanks In-Range Help

    No data in your file. No expected result sin your file... so reverting to my sample:

    =IFERROR(1/(1/AVERAGE(SUM(B11:B19),SUM(B22:B30))),"")

    or

    =IFERROR(1/(1/AVERAGE(SUM(B11:B19),SUM(B22:B30))),"Null")
    Attached Files Attached Files

  10. #10
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,380

    Re: Average/Sum Ignoring Blanks In-Range Help

    Pls try this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ 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: 14
    Last Post: 04-25-2017, 03:11 AM
  2. [SOLVED] Average last n numbers ignoring blanks
    By Cryptic in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-06-2013, 07:05 AM
  3. Average tabs ignoring blanks
    By jbwizoz in forum Excel General
    Replies: 3
    Last Post: 11-16-2011, 05:00 PM
  4. Average ignoring Blanks cells
    By Justinmih in forum Excel General
    Replies: 10
    Last Post: 09-30-2011, 06:21 PM
  5. UDF to calculate average according to condition, ignoring blanks
    By dmitry in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-14-2011, 05:51 PM
  6. Replies: 1
    Last Post: 01-25-2011, 10:37 PM
  7. [SOLVED] Conditional Average Ignoring Blanks
    By Dirk Friedrichs via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-06-2005, 11:06 AM

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