+ Reply to Thread
Results 1 to 4 of 4

Help with Formula: Average with Large with Sumifs

  1. #1
    Registered User
    Join Date
    03-03-2013
    Location
    Chicago, IL
    MS-Off Ver
    Office 365
    Posts
    17

    Help with Formula: Average with Large with Sumifs

    Hi,
    I am trying to create a formula where I use a combination of average, large and sumif formulas. I am using a sumif formula instead of average bill rate column to prevent using simple averages versus weighted average. I have attached a sample file with data and my failed attempt. The formula should read as, take the top 3 average bill rates by product line and client name and give me the average of the top 3 bill rates for that specific client and product line. See excel file. Please let me know if you have any question and thank you in advance!
    Attached Files Attached Files
    Last edited by excel-lent13; 05-05-2021 at 04:23 PM.

  2. #2
    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
    28,191

    Re: Help with Formula: Average with Large with Sumifs

    Your sample of Client 1 / ABC only has one non-zero entry: are these zero entries to be included/excluded in the average.

    Likewise your second example has a zero entry.

    What is the significance of taking top 5 but only averaging top 3?

  3. #3
    Registered User
    Join Date
    03-03-2013
    Location
    Chicago, IL
    MS-Off Ver
    Office 365
    Posts
    17

    Re: Help with Formula: Average with Large with Sumifs

    Hi John,
    The top 5 was a typo, should be top 3 so take top 3 bill rates and give me the average of those 3 (i fixed my original post). As it relates to the zero entries, these should be included, but can we added in a formula that says if zero or iferror, vlookup the product line in another table and use that bill rate. I can create a separate table with some assumption by product line when data is not there.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,552

    Re: Help with Formula: Average with Large with Sumifs

    It is a good practice to include at least some manually calculated values so that we can see if the values our formulas yield are correct.
    That said here is a proposal that yields values that appear to be what you want based on the formula that was previously in column K.
    1. Populate column G using: =SUMPRODUCT((A$2:A$19=A2)*(C$2:C$19=C2)*(D$2:D$19>D2))+1
    Note that G2:G19 may be moved and/or hidden for aesthetic purposes.
    2. Populate column K using: =SUMIFS($D$2:$D$19,$C$2:$C$19,J2,$A$2:$A$19,I2,G$2:G$19,"<=3")/SUMIFS($E$2:$E$19,$C$2:$C$19,J2,$A$2:$A$19,I2,G$2:G$19,"<=3")
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Replies: 1
    Last Post: 11-22-2016, 01:54 AM
  2. [SOLVED] Looking for an Average SumIF formula for Multiple SumIfs
    By angie.smith in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-07-2015, 10:59 AM
  3. Using SUMIFS & LARGE (or similar?)
    By shalx in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 12-08-2014, 06:42 AM
  4. Replies: 1
    Last Post: 10-20-2014, 03:20 PM
  5. [SOLVED] Either/Or within a SUMIFS formula (part of a weighted average formula)
    By macrorookie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-11-2014, 09:56 PM
  6. Sumifs, large & rank
    By M1234 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-28-2013, 11:23 AM
  7. [SOLVED] Using cell value as worksheet name in formula reference(AVERAGE LARGE IF)
    By trizzo in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-26-2013, 09:23 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