+ Reply to Thread
Results 1 to 12 of 12

How to get a range of data with specific criteria to return an average of that data.

  1. #1
    Registered User
    Join Date
    06-03-2017
    Location
    Miami
    MS-Off Ver
    2013
    Posts
    5

    How to get a range of data with specific criteria to return an average of that data.

    Hi,

    I have a range of data from a dyno tune of electric motors for RC racing. I have a column of rpm and power out. The rpm were marked with different points of data (e.g. 3755, 7654, 9945, etc) and gives out total power out (W). I am trying to get the average power out (W) from a specific range of data from the RPM, say for example, from 5k - 10k. The formula I had was below:

    =AVERAGEIF(C2:C184,5000<=10000,E2:E184)

    It did not work and gave me the =DIV/0

    Is there another way to do this?
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: How to get a range of data with specific criteria to return an average of that data.

    Your formula syntax is incorrect.

    Try this instead:

    =AVERAGEIFS(E2:E184,C2:C184,">="&5000,C2:C184,"<=10000")

    If there was nothing under row 184 (that shouldn't be considered in the formula) you could use whole column references without a (noticeable) performance decrease to make it a little shorter:

    =AVERAGEIFS(E:E,C:C,">="&5000,C:C,"<=10000")
    Last edited by 63falcondude; 06-03-2017 at 10:02 AM.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: How to get a range of data with specific criteria to return an average of that data.

    That's actually TWO tests, >=5000 and <=10000, they are handled separately.

    =AVERAGEIFS($E$2:$E$184,$C$2:$C$184,">="&C186,$C$2:$C$184,"<="&D186)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    06-03-2017
    Location
    Miami
    MS-Off Ver
    2013
    Posts
    5

    Re: How to get a range of data with specific criteria to return an average of that data.

    Falcondude, it was giving me an error saying it doesn't recognize the formula. Hard to explain. EDIT: sorry, I just realize what you said if there was nothing under row 184. I will try that again.

    However, Jbeaucaire, it worked. I'm trying to understand why all the $? Is there a way you can explain the reason for it? Is it just so it only grabs the data from that range?

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How to get a range of data with specific criteria to return an average of that data.

    I should solve this with a helpcolumn and VLookup.

    After that a pivot table.

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Registered User
    Join Date
    06-03-2017
    Location
    Miami
    MS-Off Ver
    2013
    Posts
    5

    Re: How to get a range of data with specific criteria to return an average of that data.

    That was super fast. I still haven't learned how to do pivot tables or Vlookup. Should I get a book for it or is there something online you guys recommend?

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: How to get a range of data with specific criteria to return an average of that data.

    I learned it the hard way, (work much with excel) and learn from others (other questions).

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,959

    Re: How to get a range of data with specific criteria to return an average of that data.

    for info. The $ signs lock cell references.

    =$A1 copied across will return the value in A1, but will return the value in A2, A3, etc when copied down
    =A$1 copied down will return the value in A1, but will return the value in B1, C1, etc when copied across
    =$A$1 will return the value in A1, irrespective of the direction in which it is copied
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  9. #9
    Registered User
    Join Date
    06-03-2017
    Location
    Miami
    MS-Off Ver
    2013
    Posts
    5

    Re: How to get a range of data with specific criteria to return an average of that data.

    Am I missing something in this formula? I'm trying to use another sheet in the workbook.

    =AVERAGEIFS('30 Degrees'!$E$2:$E$184,'30 Degrees'!$C$2:$C$184,">="&'30 Degrees'!C186,'30 Degrees'!$C$2:$C$184,"<="&'30Degrees'!D186)

  10. #10
    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,133

    Re: How to get a range of data with specific criteria to return an average of that data.

    What is the problem?

    =AVERAGEIFS('30 Degrees'!$E$2:$E$184,'30 Degrees'!$C$2:$C$184,">="&'30 Degrees'!C186,'30 Degrees'!$C$2:$C$184,"<="&'30 Degrees'!D186)

    space missing in posted formula but assume that is just a typo.

  11. #11
    Registered User
    Join Date
    06-03-2017
    Location
    Miami
    MS-Off Ver
    2013
    Posts
    5

    Re: How to get a range of data with specific criteria to return an average of that data.

    Quote Originally Posted by JohnTopley View Post
    What is the problem?

    =AVERAGEIFS('30 Degrees'!$E$2:$E$184,'30 Degrees'!$C$2:$C$184,">="&'30 Degrees'!C186,'30 Degrees'!$C$2:$C$184,"<="&'30 Degrees'!D186)

    space missing in posted formula but assume that is just a typo.
    Please smack me across the face lol. That solved it.

  12. #12
    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,133

    Re: How to get a range of data with specific criteria to return an average of that data.

    Easily done!!!

+ 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. Find average of last 24 hrs data from a filtered range based on a criteria
    By styldude in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-18-2017, 05:18 AM
  2. Replies: 3
    Last Post: 03-26-2017, 03:24 PM
  3. [SOLVED] NEWB- Trying to average data based on specific criteria
    By fpgary in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-07-2015, 05:20 PM
  4. Replies: 4
    Last Post: 05-14-2015, 02:48 PM
  5. [SOLVED] Formula to return specific data to a certain criteria
    By orshims in forum Excel General
    Replies: 4
    Last Post: 05-08-2015, 04:35 PM
  6. [SOLVED] One formula to average specific criteria from data range
    By nicki_rae22 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2013, 02:33 PM
  7. Return average and count from multiple criteria in a list or array of data
    By robcosta in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-22-2008, 03:18 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