+ Reply to Thread
Results 1 to 12 of 12

Averageifs: average a data set if cell next to it is equal to 120

  1. #1
    Registered User
    Join Date
    06-29-2023
    Location
    Soda Springs, Idaho
    MS-Off Ver
    Microsoft 16
    Posts
    11

    Question Averageifs: average a data set if cell next to it is equal to 120

    Hello!

    So I am trying to get the formula to average a data set if the cell next to it is equal to 120, but for some reason it doesn't work when I enter the number. I had this exact formula working when referencing another cell, so the '120' value was imputable, so not sure what happened. How should I write the 120 part?

    Let me know if there doesn't make sense lol.


    Thanks in advance.
    Last edited by AliGW; 07-26-2023 at 10:48 AM. Reason: Thread title improved - generic thread titles are NOT permitted.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,739

    Re: Averageifs

    It would help if you attached a sample Excel workbook, so we can see your problem in context. Follow the guidelines given in the yellow banner at the top of the screen.

    Pete

  3. #3
    Registered User
    Join Date
    06-29-2023
    Location
    Soda Springs, Idaho
    MS-Off Ver
    Microsoft 16
    Posts
    11

    Re: Averageifs

    Hopefully this helps.
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,467

    Re: Averageifs

    It returns "No data" because there is no data for the date 4/01/2022.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,467

    Re: Averageifs

    Or is this what you mean:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-29-2023
    Location
    Soda Springs, Idaho
    MS-Off Ver
    Microsoft 16
    Posts
    11

    Re: Averageifs

    Thank you for your response.

    Yes, that part of the code works and thus returns No Data because there is No Data for that date, I included that date just to demonstrate the formula. What I am attempting to do is replace the code that references the box with a code that is just a number.
    So Instead of referencing whatever number is in the box it only ever references one number. However, I can not get this to work in the formula.

    Thanks again.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,467

    Re: Averageifs

    See post #5. I suspect that you have put the fixed value/number in quotes.

  8. #8
    Registered User
    Join Date
    06-29-2023
    Location
    Soda Springs, Idaho
    MS-Off Ver
    Microsoft 16
    Posts
    11

    Re: Averageifs

    Sorry, post #5 didn't load when I had responded yesterday. Where it says "<"&$C$5 is the piece that control the input. I would like this part to be just 120. This way, instead of changing with the inputted value, it is always 120.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Averageifs

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new, I shall do it for you ONCE only.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Averageifs: average a data set if cell next to it is equal to 120

    Maybe you mean this:

    =IFERROR(AVERAGEIFS(Sheet2!$E$3:$E$81,Sheet2!$A$3:$A$81,B6,Sheet2!$E$3:$E$81,"<"&120,Sheet2!$D$3:$D$81,"W",Sheet2!$J$3:$J$81,$C$5),"No Data")

  11. #11
    Registered User
    Join Date
    06-29-2023
    Location
    Soda Springs, Idaho
    MS-Off Ver
    Microsoft 16
    Posts
    11

    Re: Averageifs: average a data set if cell next to it is equal to 120

    That was what I was trying to do, thanks.

    For the same criteria, how would I make it so it averages numbers between the inputted number and 120?

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,987

    Re: Averageifs: average a data set if cell next to it is equal to 120

    Your attempt at an updated title was equally vague - I have changed it to this:

    Averageifs: average a data set if cell next to it is equal to 120
    Please be more specific in future thread titles.

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. Help with AverageIfs
    By fishruiz in forum Excel General
    Replies: 2
    Last Post: 08-06-2021, 09:57 AM
  2. Averageifs
    By afpemi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-11-2021, 05:12 PM
  3. Averageifs #DIV/0!
    By rjsnl in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-17-2020, 09:47 AM
  4. Averageifs
    By Sprout07 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-21-2016, 01:47 AM
  5. Averageifs
    By Tim Bos in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-26-2015, 09:41 AM
  6. [SOLVED] Averageifs
    By yuenk in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-07-2015, 10:59 AM
  7. [SOLVED] Averageifs?
    By thelastflame in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 03-10-2014, 01:09 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