+ Reply to Thread
Results 1 to 10 of 10

AVERAGEIF with multiple columns average_range

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    2003
    Posts
    17

    AVERAGEIF with multiple columns average_range

    I am trying to use the following formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    So, I need to average on multiple columns, but the formula takes into account only 1st column of my average_range as if it was written like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    How can I modify it or possible use {=AVERAGE(IF(.... } variant to account for multiple rows to calculate?
    Last edited by Shurov; 12-11-2014 at 08:35 AM.

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: AVERAGEIF with multiple columns average_range

    I think averageifs can accomplish that though I haven't used that function yet but if you have 2007 or later excel it is available. Give it a try and see.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    2003
    Posts
    17

    Re: AVERAGEIF with multiple columns average_range

    Unfortunately, no, it will not help. AVERAGEIFS takes care of multiple conditions, but single average_range that in AVERAGEIFS should be the same size as conditions_range.
    While I need 1 conditions_range that is only 1-column-width and 1 average_range that is 5-columns-width.
    Last edited by Shurov; 12-11-2014 at 08:39 AM.

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: AVERAGEIF with multiple columns average_range

    ok, it was worth a shot. Good luck.

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: AVERAGEIF with multiple columns average_range

    You need the array formula**:

    =AVERAGE(IF(P30:P67=1,AQ30:AQ67))

    Regards


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Click * below if this answer helped

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

  6. #6
    Registered User
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    2003
    Posts
    17

    Re: AVERAGEIF with multiple columns average_range

    Quote Originally Posted by XOR LX View Post
    You need the array formula**:
    =AVERAGE(IF(P30:P67=1,AQ30:AQ67))
    I have tried it already, thanks. However, it returns some wrong values... they are different from AVERAGEIF gormula, however not the needed ones (when I check average manually). I couldn't found out, how they are calculated, yet

  7. #7
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: AVERAGEIF with multiple columns average_range

    you may need to post a sample spread sheet to get better suggestions.

  8. #8
    Registered User
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    2003
    Posts
    17

    Re: AVERAGEIF with multiple columns average_range

    Here is the sample book
    Book1.xlsx

    array function {=AVERAGE(IF...))} really works correct in this book. However, it fails to produce correct result when there are some missing values in the line with flag.

    If you try to dele some values in 5th row, the formula will produce one result, while manual calculation of average on the needed row will produce another result.
    How should I edit the function to omit empty cells?

    I have tried to write smth like {=AVERAGE(IF(AND(A2:A6=1;C2:G6<>"");C2:G6))} but it returns zero value

  9. #9
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: AVERAGEIF with multiple columns average_range

    You can't use AND, use this syntax

    =AVERAGE(IF(A2:A6=1;IF(C2:G6<>"";C2:G6)))

    confirmed with CTRL+SHIFT+ENTER
    Audere est facere

  10. #10
    Registered User
    Join Date
    08-14-2012
    Location
    USA
    MS-Off Ver
    2003
    Posts
    17

    Re: AVERAGEIF with multiple columns average_range

    Quote Originally Posted by daddylonglegs View Post
    You can't use AND, use this syntax
    =AVERAGE(IF(A2:A6=1;IF(C2:G6<>"";C2:G6)))
    confirmed with CTRL+SHIFT+ENTER
    that's it! thanks a lot!

+ 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. [SOLVED] AVERAGEIF Multiple Columns
    By Markvx in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 08-29-2015, 08:48 AM
  2. [SOLVED] AverageIF using multiple criteria in different columns in multiple worksheets
    By trubertiam in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-03-2014, 09:28 PM
  3. AVERAGEIF function for multiple columns.
    By thatguytg53 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-11-2014, 06:17 PM
  4. Averageif multiple columns
    By bronzboy in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-27-2013, 03:59 PM
  5. [SOLVED] AverageIf need wider average_range than range
    By kovarian in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-30-2013, 01:07 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