INDEX, MATCH, CONCATENATE Problem

RobV1

New Member
Joined
Dec 19, 2017
Messages
3
Good evening all!

I was wondering if anyone could possible offer a solution/guidance to a problem I'm having.

I have 2 tables of data on 2 worksheets. I have 2 criteria that I wish to search, and for all matches, concatenate the values.

Unfortunately I cannot use VBA, UDFs or addins for this (IT security protocols).

The tables below should help illustrate what I'm trying to achieve.

Table 1 - where i want the concatenated values to populate:

Nameweekconcat info
Person 1week 1
Person 2week 1

<tbody>
</tbody>

Table 2 - values to be concatenated:

Nameweek 1week 1week 1week 1week 1week 2
Person 1Applesorangespearsapplespearspineapple
Person 2

<tbody>
</tbody>

So what i'm trying to achieve is below:

Nameweekconcat values
Person 1week 1Apples, oranges, pears, apples, pears
Person 2week 1

<tbody>
</tbody>

The criteria to match therefore are the name and week, with all values matching these to be concatenated as above.

I've tried a number of things but can't seem to get any to work, I'm thinking the best bet will be an index, match, concatenate combo but keep getting #value or #ref errors.

I've figured out how to use index match to pull a single value, but its the inclusion of concatenation that is throwing me.

Here is the actual formula to pull a single value:
=INDEX(Comments!$B$3:$AJ$66,MATCH($C$1,Comments!$A$2:$AJ$2,0),MATCH(A4,Comments!$A$3:$A$66,0))

Could anyone advise how to either incorporate the concatenation (i've pulled all information into one table as it really doesn't like indirect for some reason) - or what would be even better if anyone could advise how to amend it so that it will search based on an indirect range, and then concatenate the information.

Sorry its such a long post, i'm trying to make it super clear what i'm trying to achieve, its been boxing my brain for weeks and I can see no solution!

Thank you all in advance.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
You will require the up-to-date version of Excel to use function TEXTJOIN.

Copy I7 down as necessary after properly invoking it as an array-formula.

ABCDEFGHI
1Nameweek 1week 1week 1week 1week 1week 2week 2
2Person 1Applesorangespearsapplespearspineapplegrapes
3Person 2beefvealfois groislobsteroysterscaviarsushi
4
5
6Nameweekconcat values
7Person 1week 1Apples, oranges, pears, apples, pears
8Person 2week 1beef, veal, fois grois, lobster, oysters
9Person 1week 2pineapple, grapes
10Person 2week 2caviar, sushi
11person 5week 7

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet5

Array Formulas
CellFormula
I7{=TEXTJOIN(", ",TRUE,IF(G7=$A$2:$A$3,IF(H7=$B$1:$H$1,$B$2:$H$3,""),""))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try to enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,596
Messages
6,120,438
Members
448,966
Latest member
DannyC96

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top