+ Reply to Thread
Results 1 to 9 of 9

AVERAGE values if conditions met

  1. #1
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    AVERAGE values if conditions met

    Would like a formula to average values if the 2 conditions are met. Average shipping time C2:C20 on Product Sheet if product name in B2:B20 of Product sheet and region in D2:D20 on Product sheet conditions are met.

    Example, Alicante, Bouschet (product in D2 of Outcome sheet). Average Alicante, Bouschet if region condition is satisfied. Desired answer = 14. See F4 and F5 for desired outcome.

    Sample file attached.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,918

    Re: AVERAGE values if conditions met

    withdrawn........
    Last edited by protonLeah; 01-09-2017 at 09:52 PM.
    Ben Van Johnson

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: AVERAGE values if conditions met

    Or this...
    =AVERAGEIFS(Products!$C:$C,Products!$B:$B,"*"&Outcome!D4&"*",Products!$D:$D,Outcome!E4)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Re: AVERAGE values if conditions met

    protonLeah: proposed formula is an array and will need to press Ctrl + Alt + Enter. Please clarify.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: AVERAGE values if conditions met

    Although SUMPRODUCT is a function which works with arrays, it does not normally need to be committed using Ctrl-Shift-Enter.

    However, the AVERAGEIFS solution put forward by Ford is likely to execute more quickly.

    Hope this helps.

    Pete

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,671

    Re: AVERAGE values if conditions met

    Yes: it is an array formula but needs correcting.


    =SUMPRODUCT(--(ISNUMBER(SEARCH(Outcome!D4,Products!B2:B20))*(Products!D2:D20=Outcome!E4)),Products!C2:C20)/SUM(--(ISNUMBER(SEARCH(Outcome!D4,Products!B2:B20))*(Products!D2:D20=Outcome!E4)))

    Use Ford's non-array AVERAGEIFS

  7. #7
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Re: AVERAGE values if conditions met

    FDibbins: works like a charm! Thanks FDibbins.

  8. #8
    Forum Contributor
    Join Date
    02-06-2013
    Location
    Maryland
    MS-Off Ver
    Excel 2010
    Posts
    1,012

    Re: AVERAGE values if conditions met

    JohnTopley: thanks JohnTopley.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: AVERAGE values if conditions met

    Happy to help and thanks for the feedback

+ 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 with conditions
    By Marcelo Carraro in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-09-2013, 03:36 PM
  2. [SOLVED] Find average values with conditions
    By bigband1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-14-2012, 05:28 PM
  3. Average value on conditions
    By AGA in forum Excel General
    Replies: 2
    Last Post: 12-08-2010, 12:52 PM
  4. average with conditions
    By ravi_m5_2000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-03-2009, 12:05 PM
  5. Replies: 1
    Last Post: 03-12-2009, 06:33 AM
  6. Average and Conditions
    By ggutier49 in forum Excel General
    Replies: 5
    Last Post: 12-23-2008, 04:36 PM
  7. Average IF (two conditions)
    By girlofscience in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-29-2008, 02:57 PM
  8. average with 2 conditions
    By s in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-15-2006, 09:55 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