/* substituteMult Description Substitutes newtext for multiple oldtext in a text string. Syntax SUBSTITUTEMULT(text, oldtext, newtext,[oldtextpos]) The SUBSTITUTE function syntax has the following arguments: Text Required. The text or the reference to a cell containing text for which you want to substitute characters. Oldtext Required. The text you want to replace. For multiple texts type as array eg {"a","b"} or range A1:C1 Newtext Required. The text you want to replace oldtext with. For multiple texts type as array eg {"a","b"} or range A1:C1 corresponding to Oldtext. It can be a single text. Oldtextpos Optional. For recursive purpose only. Example A2=abc;de,fgh:xy =SUBSTITUTEMULT(A2,{";",",",":"},"|") Return abc|de|fgh|xy =SUBSTITUTEMULT(A2,{";",",",":"},{"1","2","3") Return abc1de2fgh3xy */ substituteMult=LAMBDA(text, oldText, newText, [oldTextPos], LET( _text, text, _oText, IF( ROWS(oldText) > 1, TRANSPOSE(oldText), oldText ), _nText, IF( ROWS(newText) > 1, TRANSPOSE(newText), newText ), _pos, IF( OR( ISOMITTED( oldTextPos ), oldTextPos = 0 ), 1, oldTextPos ), _o, INDEX( _oText, _pos ), _n, IF( COLUMNS(_nText) = 1, INDEX( _nText, 1, 1 ), IFERROR( INDEX( _nText, _pos ), "" ) ), _rtn, SUBSTITUTE( _text, _o, _n ), IF( _pos + 1 <= COLUMNS( _oText ), substituteMult( _rtn, _oText, _nText, _pos + 1 ), _rtn ) ) ) ;