+ Reply to Thread
Results 1 to 3 of 3

Getting an average value from a range, with 3 variables

  1. #1
    Registered User
    Join Date
    03-02-2023
    Location
    England
    MS-Off Ver
    365
    Posts
    8

    Getting an average value from a range, with 3 variables

    Hi guys,

    Hoping you can help me out.

    I have a table which shows values daily of performance, for multiple regions.

    My quest is to be able to input two dates (start date and end date), plus the region, and for a formula to be able to calculate the average performance between those two dates for that region.

    Excel workbook attached for clarity.

    Please help!

    Thanks, Cai
    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 2406
    Posts
    44,213

    Re: Getting an average value from a range, with 3 variables

    One way:

    =LET(A,B3:B100,B,C3:G100,C,C2:G2,D,FILTER(B,C=K4),AVERAGE(FILTER(D,(A>=K2)*(A<=K3))))
    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

  3. #3
    Registered User
    Join Date
    03-02-2023
    Location
    England
    MS-Off Ver
    365
    Posts
    8

    Re: Getting an average value from a range, with 3 variables

    Quote Originally Posted by Glenn Kennedy View Post
    One way:

    =LET(A,B3:B100,B,C3:G100,C,C2:G2,D,FILTER(B,C=K4),AVERAGE(FILTER(D,(A>=K2)*(A<=K3))))
    Well THAT worked a treat. Thank you so much for such a quick response and elegant solution.

+ 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] Average if for 2 variables of greater than and less than
    By mrteater in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-19-2022, 10:14 AM
  2. Average of Unique Variables
    By Harshit0204 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-17-2014, 11:00 AM
  3. Weighted Average accounting for 2 variables??
    By dz6kb4 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-19-2013, 08:35 AM
  4. Average with 2 variables
    By paconovellino in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-06-2013, 07:26 PM
  5. [SOLVED] Average of Range - While Accounting for Variables
    By StevenBleich in forum Excel General
    Replies: 6
    Last Post: 06-01-2012, 02:31 PM
  6. Using variables to determine a range for an average.
    By blastronaut in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-08-2011, 05:58 PM
  7. Weighted Average with multiple variables
    By bigtoad in forum Excel General
    Replies: 4
    Last Post: 02-27-2011, 04:07 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