+ Reply to Thread
Results 1 to 4 of 4

AverageIf Formula with 2 criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    03-13-2018
    Location
    los angeles, ca
    MS-Off Ver
    2016
    Posts
    2

    AverageIf Formula with 2 criteria

    Hi all,

    I'm working on a project due tomorrow (or technically today) and I hit a roadblock with the averageif formula I need to calculate.

    I'm trying to combine 2 criteria using an external reference.

    The first criteria is that the a range in an external worksheet matches a line in the current worksheet (i.e. that's the external reference: i.e. AVERAGEIFS(Mission!$A$1:$A$122,"="&C4,)

    I then want to take the averages of a different column in the external worksheet for only the values that are less than 300 and return that i.e.: Mission!$C$1:$C$122,"<300") OR Mission!$C$1:$C$122"<300"),Mission!$C$1:$C$122 .


    I have this so far (that's not working):

    =AVERAGEIFS(Mission!$A$1:$A$122,"="&C4,Mission!$C$1:$C$122,"<300")

    I also tried: =AVERAGE(IF((Mission!$A$1:$A$122,"="&C4)+(Mission!$C$1:$C$122"<300"),Mission!$C$1:$C$122))

    Any suggestions? Thanks in advance!

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: AverageIf Formula with 2 criteria

    welcome to the forum. you are very close, i think. and the reason why i can only guess is because we cannot see what is in your file. do upload an excel sample so that we do not have to manually key in your data to do a testing.

    input the desired results so that we don't have to second-guess if what we are doing is correct or not. you may look at my signature to upload an eg that is easier to understand.

    the upload attachment must be done by going to Go Advanced. click on Manage Attachments. Choose file, upload and close the window.

    if i really guessed it wrongly, please upload something according to my recommendations. try to use the solution i have given and we'll help to advise what went wrong.

    my guess is:
    =AVERAGEIFS(Mission!$C$1:$C$122,Mission!$A$1:$A$122,"="&C4,Mission!$C$1:$C$122,"<300")
    you are missing the red portion. you need to tell Excel what to average when A1:A122=C4 and C1:C122 is lesser than 300. i have uploaded a sample file where it will average the yellow cells in Mission worksheet (A1:A122=C4 and C1:C122 is lesser than 300).
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  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,048

    Re: AverageIf Formula with 2 criteria

    AVERAGEIFS only works on open workbooks, so if the other file is closed, it will return an error.

    AVERAGEIFs() also starts with the average-range, then lists the criteria range and criteria (unlike the regular AVERAGEIF) - looks like you have it misplaced

    Also, you dont need to include "=" if it is a direct reference like that (its not wrong, just unnecessary)

    =AVERAGEIFS(Mission!$A$1:$A$122,"="&C4,Mission!$C$1:$C$122,"<300")
    you could just use...
    =AVERAGEIFS(Mission!$A$1:$A$122,C4,Mission!$C$1:$C$122,"<300")
    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
    Registered User
    Join Date
    03-13-2018
    Location
    los angeles, ca
    MS-Off Ver
    2016
    Posts
    2

    Re: AverageIf Formula with 2 criteria

    Thank you!!!! That did it . Saved me a lot of time experimenting...

    Is there a really good book/course/resource for these (seemingly more advanced) functions/formulas?

+ 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] AverageIF multiple criteria
    By tsakta13ole in forum Excel General
    Replies: 4
    Last Post: 03-12-2018, 11:41 AM
  2. [SOLVED] AVERAGEIF Date Criteria
    By theTaoJones in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-15-2018, 11:15 AM
  3. Averageif criteria
    By wpryan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-03-2015, 07:11 AM
  4. Averageif for the top 70,80,90% and based on a criteria
    By skate1991 in forum Excel General
    Replies: 16
    Last Post: 05-06-2015, 12:54 PM
  5. averageif formula with multiple criteria
    By CPitta in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-08-2013, 12:56 PM
  6. AverageIf based on different criteria
    By caseman in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-16-2013, 02:18 PM
  7. Criteria question - AverageIF (if you please)
    By djalexr in forum Excel General
    Replies: 3
    Last Post: 01-14-2011, 08:00 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