+ Reply to Thread
Results 1 to 8 of 8

Trying to Find Average of Values Based on Lookup Range

  1. #1
    Registered User
    Join Date
    02-10-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 365
    Posts
    30

    Trying to Find Average of Values Based on Lookup Range

    Hello,
    I am trying to simplify data log dumps that I get that could be up to 1000 rows long. Column A is % Utilization and ranges from 0.00 - 100.00. I want to be able to get the average of the values of column B that fall between each whole % range (ex. 24.00 - 24.99) and return that average to Column D (column C is whole % numbers between 1 - 100). There is no set Range between the % values, it could be 4 rows, it could be 40 rows. I have attached a demo sheet that gives an idea as to what I have and how I would like to see the data. Any help would be greatly appreciated!

    Thanks,
    Bryce
    Attached Files Attached Files

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Trying to Find Average of Values Based on Lookup Range

    Try

    =AVERAGEIFS($B$3:$B$33,$A$3:$A$33,">="&C11,$A$3:$A$33,"<"&C11+1)

  3. #3
    Registered User
    Join Date
    02-10-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 365
    Posts
    30

    Re: Trying to Find Average of Values Based on Lookup Range

    Thank you for your reply. The biggest problem i have is that in your solution I would have to manually select my ranges. I would like it to be able to find the range (>=0.00 and <=0.99, >=1.00 and <=1.99, etc). The logs I'm dealing with have thousands of lines of data, so being able to automatically find the ranges is key.

    Thanks,
    Bryce

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Trying to Find Average of Values Based on Lookup Range

    The problem you're having is the values in column A are not exactly as they appear.
    You have them formatted to show only 2 decimals, when they are much more than that.

    Example, A21 shows to be 26.00. But it's actually 25.9984378814697
    Therefor it is NOT between 26 and 26.99
    Nor would it be between 25 and 25.99

    It WOULD however be counted as greater than or equal to 25 and Less than 26 (which is how the formula I posted is counting it).
    Last edited by Jonmo1; 02-12-2018 at 03:48 PM.

  5. #5
    Registered User
    Join Date
    02-10-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 365
    Posts
    30

    Re: Trying to Find Average of Values Based on Lookup Range

    Hey Jonmo,
    Thank you for pointing out the rounding! Your formula works great! You guys here always amaze me on your Excel foo!!! One other quick cosmetic question... for ranges that "aren't" represented in the log data I get a "#DIV/0!" code which I know is normal. Is there a way to have it display as 0 rather than the error code?

    Thanks again!
    Bryce

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Trying to Find Average of Values Based on Lookup Range

    You're welcome.

    You can use IFERROR

    =IFERROR(AVERAGEIFS($B$3:$B$33,$A$3:$A$33,">="&C11,$A$3:$A$33,"<"&C11+1),0)

  7. #7
    Registered User
    Join Date
    02-10-2009
    Location
    San Diego, CA
    MS-Off Ver
    Excel 365
    Posts
    30

    Re: Trying to Find Average of Values Based on Lookup Range

    Well that did it! Thank you very much for all of your help Jonmo! I love this place!

    Thanks!!!

    Bryce

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Trying to Find Average of Values Based on Lookup Range

    You're welcome.

+ 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. [SOLVED] Updating Average based on values input into the range
    By Dan_B in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-08-2017, 09:32 AM
  3. [SOLVED] V-Lookup to average a horizontal range of values
    By tmleynek in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 05-04-2016, 09:11 AM
  4. [SOLVED] Correct syntax for function to find average based on background color of cells in range
    By moosetales in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-21-2014, 12:24 AM
  5. [SOLVED] Need to find average of an array if corresponding values are within a set range
    By Pallav001 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-21-2013, 03:06 AM
  6. Lookup and find a value based on 2 values
    By loki11 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-24-2012, 08:25 AM
  7. Average of range based on lookup
    By MISC_IT in forum Excel General
    Replies: 7
    Last Post: 07-01-2012, 02:57 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