Results 1 to 4 of 4

How to define multiple ranges with AVERAGEIF().

Threaded View

Snoddas How to define multiple ranges... 08-08-2013, 06:45 AM
martindwilson Re: How to define multiple... 08-08-2013, 01:16 PM
mjac101 Re: How to define multiple... 06-24-2018, 11:04 PM
FDibbins Re: How to define multiple... 06-24-2018, 11:50 PM
  1. #1
    Registered User
    Join Date
    04-12-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2007
    Posts
    30

    Smile How to define multiple ranges with AVERAGEIF().

    Hi all!
    I have a little problem with a formula in a work document.

    It is a document that shows figures for each day of the year with week, month and year total summaries. Some columns in this document calculates averages.

    For the Weekly summaries i am using the following formula:
    =IFERROR(IF(COUNT(B1,B4,B5,B6,B7,B8,B9),AVERAGEIF((B1:B4:B9),"<>0"),0),0)

    This is for two reason:
    1. I don't want the #DIV/0! error to be displayed when the average is calculated for empty cells so that the week, month and year totals always displays values.
    2. I want "0" and blank cells to be excluded from the calculations.

    The problem i have is that when a week spans two months, the RANGE in the formula must be split into two (because the month summary is in between) and for the "IF(COUNT" part in the above formula i can just use commas to define each cell instead of two ranges.
    BUT, i cannot find a way to define multiple cells or ranges with "AVERAGEIF". I tried using commas as with COUNT and i also tried using it with "AVERAGEIF((B1:B4;B9)" which gave an error and suggested me to change it to "B1:B4:B9" which doesn't calculate correctly.

    See the example file attached.

    I really hope someone has a good solution or info to point out what i might be doing wrong
    Also, if suggesting an entirely different kind of formula, the important steps are:
    1. Calculate Average excluding "0" and blank cells.
    2. Show a value of "0" if an error is the result.
    3. Be able to define multiple cells or ranges.
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. AVERAGEIF for multiple ranges
    By soccow in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-17-2012, 06:58 PM
  2. [SOLVED] AVERAGEIF / SUMIF with multiple ranges
    By xandermacleod in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-13-2012, 01:26 PM
  3. Macro to define names for multiple ranges
    By pedrofogao21 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-11-2012, 12:12 PM
  4. SUMIF/AVERAGEIF with multiple ranges
    By Cassi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-04-2011, 11:10 AM
  5. [SOLVED] Using Cells Method to define Ranges
    By johnhildreth@citynet.net in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-23-2006, 12:10 PM

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