I want to check which cell value of matrix contains in "Product name" and return a value in the same row, but different column (column A).
I using this function, but it's checks only one column and not a matrix:
=INDEX(A$11:A$13, AGGREGATE(15, 6, ROW($1:$3)*SIGN(MATCH("*"&A$11:A$13&"*", B2, 0)), 1))
In simple words, I want to compute car manufacturer by product name.
This formula will work, but it is quite long and making adding to the matrix Will only add to the length:
It basically keeps looking column by column till it finds an answer that works. As said if more models are wanted new, iferror formulas will need to be added for every column in the data matrix.
A quicker shorter method would be a UDF:
Which when placed in a module attached to the workbook:
From Excel hit Alt-F11. In that window goto Insert ==> Module. Into that module paste the above code.
Here is a better explanation with pictures.
It can be called directly from the worksheet. In B2 put:
Then it does not matter the size of the data matrix.