# INDEX & SUMPRODUCT formula

1. ## INDEX & SUMPRODUCT formula

In the following table

image2.PNG

i have the following formula ( Highlighted )

=INDEX(\$U\$7:\$U\$22,SUMPRODUCT((\$V\$7:\$Z\$22=\$L20)*(ROW(\$U\$7:\$U\$22)-ROW(\$U\$6))))

\$L20 is the value in column 4

This is to extract the relevant row title from a pivot table based on the value in column 4 ( which searches the pivot table for the X ranked value , in this case the 4th )

From the image you can see that in column 4 i have two equal values and the row return in column 3 is #REF

what do i need to add to the above formula so it will pick up the correct row return? or do i need a different formula vlookup maybe?

Many thanks

2. ## Re: INDEX & SUMPRODUCT formula

There are instructions at the top of the page explaining how to attach your sample workbook.

3. ## Re: INDEX & SUMPRODUCT formula

Your SUMPRODUCT will return an array of values in a 16 x 5 matrix ... which your trying to leverage with a 16 x 1 range (c/o INDEX) - hence #REF!

Given the requirement, and your version, I would probably go with:

=IFERROR(INDEX(\$U:\$U,AGGREGATE(15,6,ROW(\$U\$7:\$U\$22)/(\$V\$7:\$Z\$22=\$L20),1)),"")

4. ## Re: INDEX & SUMPRODUCT formula

Welcome to the forum.

We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

(Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

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

#### 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