+ Reply to Thread
Results 1 to 4 of 4

IF/Index/Average

  1. #1
    Registered User
    Join Date
    11-17-2015
    Location
    Burlington, VT
    MS-Off Ver
    Office 365
    Posts
    8

    IF/Index/Average

    Hello,

    I need to take the average of values in a column if the values in two other columns meet some criteria. For the attached example, I want column G to return a 1 if the value in column E is in the bottom 3 quartiles of all the values for a given item in column A. I had this IF statement set up to do that on a more manual basis =IF(AND(E4>=QUARTILE.INC($E$4:$E$30,0),E4<=QUARTILE.INC($E$4:$E$30,3)),1,0), but I want the formula to query on the item number, not to have to manually set the parameters for each item and corresponding array. I hope I've explained this adequately.


    Book2.xlsx

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: IF/Index/Average

    You can calculate the value you want using a column of array formulas (single cell array formulas, copied down the column, not array-entered into multiple cells):

    In a cell in row 4, array-enter (enter using Ctrl-Shift-Enter) the formula

    =My formula cannot be posted for some reason

    And copy down to match your data.

    Here is your file, modified to work:

    Book2.xlsx
    Last edited by Bernie Deitrick; 01-15-2016 at 01:09 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,962

    Re: IF/Index/Average

    =if(countif(a$1:a4,a4)=1,average(if(a:a=a4, if(e:e < quartile( if( a:a=a4, e:e),3), e:e))), "")

    There was something about the original formula that the software did not like..... strange. I had to put spaces in, and then it took the formula, but changed all the caps to lowercase....

  4. #4
    Registered User
    Join Date
    11-17-2015
    Location
    Burlington, VT
    MS-Off Ver
    Office 365
    Posts
    8

    Re: IF/Index/Average

    That was perfect, thanks so much!!

+ 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] Vlookup, Index and Average..., can this be done?
    By [email protected] in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-12-2015, 12:17 PM
  2. average with index match
    By jscalem in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-15-2015, 02:26 PM
  3. average index match
    By puzzlelover22 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-01-2014, 11:21 AM
  4. Index with sum and average
    By LUNARCEA in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-27-2013, 08:45 AM
  5. Index/Match to find Starting Point of Average, Ending Point of Average Variable
    By tgentry in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-09-2012, 01:04 AM
  6. [SOLVED] How to average all rows with same index value ?
    By ducati996rl in forum Excel General
    Replies: 4
    Last Post: 06-11-2012, 06:12 AM
  7. Trying to take an average using INDEX and/or MATCH
    By doraen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2011, 01:46 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