+ Reply to Thread
Results 1 to 9 of 9

AverageIfs to average two ranges if match is met

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

    AverageIfs to average two ranges if match is met

    Looking for a formula to average data from two separate columns (column D and column E) that match a condition with time interval. Averageifs formula used is not working and will need to be tweaked.

    Formula not working:
    Please Login or Register  to view this content.
    Sample file attached.
    Attached Files Attached Files

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

    Re: AverageIfs to average two ranges if match is met

    Your times in column F are text that look like times. You'll need to convert them. You highlighted 3 values: East to North that I assumed tyou had wanted to average. However your formula was looking at East to East. Which did you want. With region 2 in C2, and real times in G, try:

    =IFERROR(AVERAGEIFS($C$17:$C$35,$D$17:$D$35,$B$2,$E$17:$E$35,$C$2,$G$17:$G$35,">="&A4,$G$17:$G$35,"<"&A5),0)
    Attached Files Attached Files
    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

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

    Re: AverageIfs to average two ranges if match is met

    Sample file revised and times now in isnumber format.
    Attached Files Attached Files

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

    Re: AverageIfs to average two ranges if match is met

    Glenn: Your times in column F are now numbers. Removed the highlight. No significance. East is the only average. Please assist.

  5. #5
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: AverageIfs to average two ranges if match is met

    cannot use averageifs with an "OR" condition
    ie column E or Column D = east

    see attached method of doing it
    basically sum/count = average
    Attached Files Attached Files
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  6. #6
    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
    44,036

    Re: AverageIfs to average two ranges if match is met

    Removed. I made a goof. Go with the reply below.
    Last edited by Glenn Kennedy; 01-20-2017 at 12:45 AM.

  7. #7
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,910

    Re: AverageIfs to average two ranges if match is met

    Or try this ...

    =IFERROR(AVERAGE(IF((($D$17:$D$35=$B$2)+($E$17:$E$35=$B$2))*($F$17:$F$35>=A4)*($F$17:$F$35<A5),C$17:C$35)),0)

    Enter with Ctrl+Shift+Enter.

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

    Re: AverageIfs to average two ranges if match is met

    humdingaling: works like a charm. Thanks rep.

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

    Re: AverageIfs to average two ranges if match is met

    Phuocam: proposed formula works like a charm! thnaks a million.

+ 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. AverageIfs function with varying ranges in a macro?
    By danceyrselfclean in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2016, 11:31 PM
  2. [SOLVED] Subtraction of Column Ranges within Averageifs Function
    By lukazi in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 02-15-2014, 03:48 AM
  3. Subtraction of Column Ranges within Averageifs Function
    By lukazi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-14-2014, 04:32 AM
  4. [SOLVED] averageifs dynamic criteria ranges
    By ValGlad in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-20-2013, 12:08 PM
  5. STDEV from AVERAGEIFS using date ranges
    By BAT3 in forum Excel General
    Replies: 4
    Last Post: 05-31-2012, 07:18 PM
  6. [SOLVED] averageifs on multiple tables/ranges
    By kpkammer in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-28-2012, 12:20 PM
  7. averageifs over several ranges
    By phstol in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-06-2009, 01:18 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