Forum Discussion

RandomPanda1933's avatar
RandomPanda1933
Copper Contributor
Jan 08, 2025
Solved

Need to return col A if another col contains the text in col B (array) anywhere

So, here's my array in columns A and B: Column L has a journal description that COULD contain one of col B descriptions. So, column L will have things like "3M LO(a)N 2024.12" OR "3M LO(a)N 2024...
  • OliverScheurich's avatar
    OliverScheurich
    Jan 22, 2025

    You are welcome. You are right, the formula i posted is the translation of the formula from the screenshot. It's actually the same formula one for english Excel and the other for german Excel. In my sample file i made an example for ~2000 rows in columns A and B and ~200 rows in column J and the formula calculates for ~2 minutes. When the calculation is finished you can copy the result and paste only the values in another column. Then you can remove the equal sign in the formula in order to prevent unintended recalculation. If the data in columns A, B and / or J changes you can add the equal sign to the formula to start the calculation.  

    Certainly this task requires massive calculation which takes its time at least with this solution. Perhaps another contributor can suggest a solution that works faster.

     

    1. Change J2:J10 to e.g. J2:J1000 according to the number of journal descriptions in that column.    And change A2:A13 and B2:B13 (to e.g. A2:A1300 and B2:B1300) according to the number of company codes and descriptions in these columns.
    2. You don't need to copy the formula down. You can enter the formula in cell C2 and it spills down the results.
    3. You should always specify the number of rows. If you referenced i.e. "J:J" (which is equal to "J1:J1048576") the formula would calculate the result for 1048576 rows. Then the calculation would take ages for this task unless Excel would crash. Therefore it's essential to always reference the rows.

Resources