Google Sheets multiple search and replace from a list

后端 未结 4 1144
温柔的废话
温柔的废话 2021-01-05 03:57

I am looking for a solution to search for certain strings in a Google Sheet and, when found, replace them with another string from a list in another sheet.

For bette

4条回答
  •  被撕碎了的回忆
    2021-01-05 04:50

    This formula must be copied down:

    =JOIN(" ";
    ArrayFormula(
    IFERROR(VLOOKUP(TRANSPOSE(SPLIT(A1;" "));List!A:B;2;0);TRANSPOSE(SPLIT(A1;" ")))))
    

    The disadvantage is that it doesn't match punctuation, so word 'Lorem' will be found, but 'Lorem:' won't. But a good reason to use this formula is that you can fill more words in list 2, even paste 'Lorem:' so it could be matched too.

提交回复
热议问题