+ Reply to Thread
Results 1 to 9 of 9

Sum of multiple Index/Match results using array formula

  1. #1
    Registered User
    Join Date
    08-24-2015
    Location
    USA
    MS-Off Ver
    google sheets
    Posts
    1

    Sum of multiple Index/Match results using array formula

    Hello,
    I have a sheet that I set up to calculate event participation among attendees based on a target number of points that is required of them. It calculates the percentage above/below the target that their accumulated points came out to be. My goal is to take those percentages and average them based off how many events they attended. If you see the attached file, it should explain a bit better.

    Since i'm going to be continuing to add event data, and the dates they occur on change, I tried to use the following formula as an array formula

    =SUM(IFERROR(INDEX(6:8,3,MATCH(E$1,6:6,0)),0))

    That formula is currently in E:3, and it shows the sum of the event percentage earned by Person A during Event 1. But I can't figure out how to set it up as an array formula to do an Index/Match to find every instance that "A" appeared within E6:AH31, and then sum the participation percentages, in a single cell.

    If you see the yellow cells and below, that's if I copy down the above formula, and it works like a charm to find the percentages I want, and the green line is the actual number i'm looking for which is the sum of all the non-errored results it finds. But I need to do it in a single formula.

    Any Ideas?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Sum of multiple Index/Match results using array formula

    Any reason why they are arranged that way? I.e. Event 1 rows 6:8, event 2 in rows 12:14 etc. Any possibility of having these data presented in a different format?

  3. #3
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Sum of multiple Index/Match results using array formula

    E2=IFERROR(INDEX($E$8:$AH$8,1,MATCH(E$1,$E$6:$AH$6,0)),0)+IFERROR(INDEX($E$14:$AH$14,1,MATCH(E$1,$E$12:$AH$12,0)),0)+IFERROR(INDEX($E$18:$AH$18,1,MATCH(E$1,$E$16:$AH$16,0)),0)

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


    I hope this is what you want?
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Sum of multiple Index/Match results using array formula

    @ quekbc

    My thoughts exactly. In the meantime I can't do any better that this array-entered monster in E3.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    As you can see it is very cumbersome and a nightmare to debug ..... and it kind of reinforces what quekbc says.
    Dave

  5. #5
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Sum of multiple Index/Match results using array formula

    Got it with some obvious drawbacks. Did this as a challenge as there was a light-bulb moment.

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


    Obvious drawback: I've limited the cell references to the relevant cells - and it is already very slow to calculate - almost 4 seconds per calculate by my initial testings.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Sum of multiple Index/Match results using array formula

    Silly me, here's a muuuuch simpler solution. As my previous post, this works on the basis that the stuff you want to SUM up is 2 rows below the headers.

    In column E of any row outside of the rows referenced (i.e. before row 4 or after row 18)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Sum of multiple Index/Match results using array formula

    Quote Originally Posted by quekbc View Post
    ......... In column E of any row outside of the rows referenced (i.e. before row 4 or after row 18)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Good one .... and silly me!

    Quick question. I noticed you used this in row 33. Have you tried it in row 3 (i.e. before row 4)? I get circular reference warning .... which makes no sense to me.

    But changed to
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    it works in either row.

    Any ideas?

  8. #8
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Sum of multiple Index/Match results using array formula

    Ah, it's because the original formula which looks into row 4 (=SUMPRODUCT(--($4:$16=E$1),$6:$18)) and row 4 is calculated based on the result in row 3. In short, row 3 formula looks in row 4:16 and row 4 is calculated using row 3 - hence the circularity.

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Sum of multiple Index/Match results using array formula

    Thanks. Hadn't even checked the formulas. Another duhhh!

+ 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. Index/Match Formula to return multiple results
    By MikeSta4ord in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-11-2015, 11:32 AM
  2. Replies: 7
    Last Post: 04-23-2015, 10:02 AM
  3. Need an array possibly INDEX/MATCH formula with multiple lookup criteria.
    By TheClaw2323 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2015, 09:59 AM
  4. [SOLVED] Sort results of INDEX/MATCH array formula remove blanks. . .
    By PeteABC123 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-14-2014, 01:53 PM
  5. Index match function without array formula for multiple rows.
    By markb141 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-29-2014, 10:35 AM
  6. Array formula - index and match with multiple statements
    By A[L]C in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 06-06-2013, 11:13 AM
  7. [SOLVED] Index/Match Array with multiple results concatenate in one cell
    By samiesosa in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2013, 01:34 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