+ Reply to Thread
Results 1 to 3 of 3

Trying to take an average using INDEX and/or MATCH

  1. #1
    Registered User
    Join Date
    02-16-2011
    Location
    Massachusetts
    MS-Off Ver
    Excel 2003
    Posts
    4

    Trying to take an average using INDEX and/or MATCH

    A B C
    100 32.5 101
    100 33.4
    100 34.5
    100 31.6
    100 34.9
    101 38.4
    101 34.4
    101 39.7
    101 39.1
    101 31.1
    102 32.4
    102 34.1
    102 33.3
    102 34.9

    I am trying to create a function that will take the value in column C and search column A. Once it finds all matching results, I would like it take an average of the corresponding values in column B.

    I have tried =AVERAGE(INDEX(B2:B15,MATCH(C2,A2:A15,0))) and haven't been able to get the correct results.
    Last edited by doraen; 02-16-2011 at 01:48 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Trying to take an average using INDEX and/or MATCH

    Try:

    =SUMIF($A$2:$A$15,C2,$B$2:$B$15)/COUNTIF($A$2:$A$15,C2)

    or

    =AVERAGE(IF($A$2:$A$15=C2,$B$2:$B$15))

    which must be confirmed with CTRL+SHIFT+ENTER not just ENTER
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    02-16-2011
    Location
    Massachusetts
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Trying to take an average using INDEX and/or MATCH

    Thank you. Just tried it out and it works.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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