Create a Matrix from a List

Alv_elm

New Member
Joined
Jul 24, 2020
Messages
2
Office Version
  1. 2013
Platform
  1. Windows
Hi everyone,
It is my first post and first of all, thanks for all the support you have provided me in the past.
I need your help in a complicated (at least for me) issue.
I would like to populate the content of a matrix based on a list.

I have got a list of 10 products to be develop A,B,C,D,E,F,G,H,I,J
In some cases this products has inter dependencies during their development, there are 4 kinds of inter dependencies INPUT, OUTPUT, BLOCKING or SYNERGIES (in some cases there is no dependencies at all).
I have created a list with all the inter dependencies based on 3 parameters (Product , Product affected by the inter dependency, Type of inter dependency)
Now I would like to put it in a more visual way, creating a 10x10 matrix where :
- Rows= Product
- Columns= Product affected by the inter dependency
- Cell (Product, Product affected by the inter dependency)= Type of interdependency.

I have tried to create a function for each of the cells based on the parameters of the list, but I always fail as I am not very good programming.
Could some one be so kind to help me please?
Thanks in advance.
Have a good weekend!!!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Welcome to the forum.

It is unlikely anyone can help unless you provide some sample data together with expected outcome. You can use this forum's XL2BB add-in to do so.
 
Upvote 0
If I understand you correctly, you have a list of dependencies with 3 columns - product1, product2 and the dependency

Then you have a matrix of all the products, and you want to place the items from your list into this matrix

If this is correct, this is what you could do. The main problem is you need to look up items based on two products at once. The trick is to turn it into a single lookup, and that is quite easy.

First add an extra column to your list, which = product1 & "-" & product2 (ie a combination of the two names separated by a dash)
So if a row has P001, P003, Dep1, the extra column would have P001-P003

In each cell of your matrix, use MATCH to look up the combination of the row name and the column name (again separated by a comma) of that cell, in the lookup column, and then use INDEX to get the dependency. If MATCH fails (ie there is no dependency), use IFERROR to make the result blank.

Hopefully you can use this example below to see how it works

qaz.xlsb
GHIJKLMNOPQ
2Product1Product2DependencyLookup Key
3af11a-fMatrixfghjk
4ah13a-ha11 13  
5bg22b-gb 22   
6cj34c-jc 32 3435
7ck35c-kd  43  
8cg32c-ge51   55
9dh43d-h
10ef51e-f
11ek55e-k
Sheet1
Cell Formulas
RangeFormula
M4:Q8M4=IFERROR(INDEX($I$3:$I$11,MATCH($L4 & "-" & M$3,$J$3:$J$11,0)),"")
J3:J11J3=G3 & "-" & H3
 
Upvote 1
Hi Dermot,
This is exactly what I was looking for.
Thanks for your help.
Also thanks to DrSteele!!

Have a good day


If I understand you correctly, you have a list of dependencies with 3 columns - product1, product2 and the dependency

Then you have a matrix of all the products, and you want to place the items from your list into this matrix

If this is correct, this is what you could do. The main problem is you need to look up items based on two products at once. The trick is to turn it into a single lookup, and that is quite easy.

First add an extra column to your list, which = product1 & "-" & product2 (ie a combination of the two names separated by a dash)
So if a row has P001, P003, Dep1, the extra column would have P001-P003

In each cell of your matrix, use MATCH to look up the combination of the row name and the column name (again separated by a comma) of that cell, in the lookup column, and then use INDEX to get the dependency. If MATCH fails (ie there is no dependency), use IFERROR to make the result blank.

Hopefully you can use this example below to see how it works

qaz.xlsb
GHIJKLMNOPQ
2Product1Product2DependencyLookup Key
3af11a-fMatrixfghjk
4ah13a-ha11 13  
5bg22b-gb 22   
6cj34c-jc 32 3435
7ck35c-kd  43  
8cg32c-ge51   55
9dh43d-h
10ef51e-f
11ek55e-k
Sheet1
Cell Formulas
RangeFormula
M4:Q8M4=IFERROR(INDEX($I$3:$I$11,MATCH($L4 & "-" & M$3,$J$3:$J$11,0)),"")
J3:J11J3=G3 & "-" & H3
 
Upvote 0
If I understand you correctly, you have a list of dependencies with 3 columns - product1, product2 and the dependency

Then you have a matrix of all the products, and you want to place the items from your list into this matrix

If this is correct, this is what you could do. The main problem is you need to look up items based on two products at once. The trick is to turn it into a single lookup, and that is quite easy.

First add an extra column to your list, which = product1 & "-" & product2 (ie a combination of the two names separated by a dash)
So if a row has P001, P003, Dep1, the extra column would have P001-P003

In each cell of your matrix, use MATCH to look up the combination of the row name and the column name (again separated by a comma) of that cell, in the lookup column, and then use INDEX to get the dependency. If MATCH fails (ie there is no dependency), use IFERROR to make the result blank.

Hopefully you can use this example below to see how it works

qaz.xlsb
GHIJKLMNOPQ
2Product1Product2DependencyLookup Key
3af11a-fMatrixfghjk
4ah13a-ha11 13  
5bg22b-gb 22   
6cj34c-jc 32 3435
7ck35c-kd  43  
8cg32c-ge51   55
9dh43d-h
10ef51e-f
11ek55e-k
Sheet1
Cell Formulas
RangeFormula
M4:Q8M4=IFERROR(INDEX($I$3:$I$11,MATCH($L4 & "-" & M$3,$J$3:$J$11,0)),"")
J3:J11J3=G3 & "-" & H3
This has worked perfectly me! Exactly what I needed. Thank you much
 
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,103
Members
452,302
Latest member
TaMere

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