Hi everyone,
I am stuck trying to figure out some formula in Excel. I have a column of some descriptions of a transaction and I need to aasign to them names (for example, to whom they belong or just for the purpose of making sense out of them). (Table 1)
By looking at them, I found some patterns, namely words or expressions they start with. I then generated a separate table with those beginnings of cells with a separate column of names. Furthermore, I generated a column of the length of the cells that contain those beginnings.
Now I am trying to figure out a formula that would look at the left of description cells (number of characters to be looked up to the left correspond to the column of lengths) and then when they match any of the cells of the first column of Table 2, then return the name that is in the second column of the table.
For demonstration, the table look like this:
Table 1
Description
.
.
.
Table 2
Beginnings | Names | Lengths
. . .
. . .
. . .
I need a formula for the second column of Table 1 that returns some content from the second column of table 2.
The formula for B2 in Table 1 looks like this:
=INDEX(Table2!A2:C190,MATCH(LEFT(Table1!A2;INDIRECT("Lengths")),INDIRECT("Beginnings"),0),2)
The formula doesn't work properly somehow returning the needed for some cells and not returning for others.
It would be cool if someone could tell me what I am doing wong or suggest any other possible solutions.
Thanks in advance!
I am stuck trying to figure out some formula in Excel. I have a column of some descriptions of a transaction and I need to aasign to them names (for example, to whom they belong or just for the purpose of making sense out of them). (Table 1)
By looking at them, I found some patterns, namely words or expressions they start with. I then generated a separate table with those beginnings of cells with a separate column of names. Furthermore, I generated a column of the length of the cells that contain those beginnings.
Now I am trying to figure out a formula that would look at the left of description cells (number of characters to be looked up to the left correspond to the column of lengths) and then when they match any of the cells of the first column of Table 2, then return the name that is in the second column of the table.
For demonstration, the table look like this:
Table 1
Description
.
.
.
Table 2
Beginnings | Names | Lengths
. . .
. . .
. . .
I need a formula for the second column of Table 1 that returns some content from the second column of table 2.
The formula for B2 in Table 1 looks like this:
=INDEX(Table2!A2:C190,MATCH(LEFT(Table1!A2;INDIRECT("Lengths")),INDIRECT("Beginnings"),0),2)
The formula doesn't work properly somehow returning the needed for some cells and not returning for others.
It would be cool if someone could tell me what I am doing wong or suggest any other possible solutions.
Thanks in advance!