+ Reply to Thread
Results 1 to 4 of 4

Calculating Averages with Multiple Criteria

  1. #1
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Calculating Averages with Multiple Criteria

    Hello

    I'm trying to create a template to calculate TotalSpend and AverageSpend for various staff expenditure . The data is fairly large, over 20,000 rows so I need a robust formula to automate the process at best. A macro will make my day!! I tried using pivot, however i couldn't arrange the table in the manner I want to present it as per the attached so I decided to play it safe with formulas instead. I want to calculate the following:

    Spend for each expense type
    Average spend per staff for each expense type
    Spend for each expense type as per Taxable code
    Spend for each expense type as per non-Taxable code

    NOTE: there are different forms of Entertaining.

    I've calculated the TotalSpend, however, I'm not sure how to go about the averages. Any ideas as to how to go calculate this or automate the spreadsheet will much appreciated?

    Many thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,880

    Re: Calculating Averages with Multiple Criteria

    If we just look at the section for GF1226, Air Travel, Flight, you should be able to adapt for everything else.

    First, I don't know if it's more efficient or not, but for me it's simpler, so another option to get the Total Spend would be to enter this formula in C73:
    =SUMIFS(Sheet1!$G$2:$G$20,Sheet1!$B$2:$B$20,$A73,Sheet1!$F$2:$F$20,$A$69,Sheet1!$C$2:$C$20,B$70,Sheet1!$D$2:$D$20,B$71)

    Either way, in Cell B73, to get the AverageSpend, try:
    =C73/COUNTIFS(Sheet1!$B$2:$B$20,$A73,Sheet1!$C$2:$C$20,B$70,Sheet1!D2:D21,B$71,Sheet1!F2:F21,A$69)
    Last edited by Gregb11; 01-17-2020 at 12:23 AM. Reason: changed formula

  3. #3
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,880

    Re: Calculating Averages with Multiple Criteria

    I posted a little in haste - I think some of the formulas can be tweaked (with absolute references or not), but hopefully it gives you the idea.

  4. #4
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Re: Calculating Averages with Multiple Criteria

    Many thanks Gregb11. This works fine! Much appreciated.

+ 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. Calculating averages with multiple cells with multiple sheets
    By CEMEL in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-22-2018, 11:17 PM
  2. Weighted averages with multiple criteria
    By Jps62 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-29-2015, 03:50 PM
  3. Averages using multiple criteria
    By BarryT59 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-07-2014, 10:22 PM
  4. Replies: 0
    Last Post: 09-18-2013, 10:04 PM
  5. YTD Averages using Multiple Criteria
    By Decatur83 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-07-2013, 08:13 AM
  6. [SOLVED] Taking simple averages with variable ranges using multiple criteria
    By Lycium in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-26-2012, 11:20 AM
  7. Replies: 2
    Last Post: 11-06-2011, 08:16 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