Explanation

This is an experimental formula to strip characters from text.

Unlike theformula explained here, this formula is not recursive.

In a nutshell, theSEQUENCE functionis used to generate twoarrays: one for thetext, one forchars.

Excel formula: LAMBDA count words

TheMID functionextracts one character at a time, andCODEreturns the numeric code.

Inside theIF function, the logical test is:

TheISNUMBERandMATCHcombo checks each code intextarragainst codes inchararr.

TheABS functionis used as a way to reverse the logic of the formula.

Excel formula: Strip non-numeric characters

Ifkeepis set to FALSE or zero, the ISNUMBER+MATCH logic is unchanged andcharsare stripped.

Ifkeepis TRUE (or 1) the logic is reversed charsare preserved and other characters are stripped.

LET Function

The Excel LET function lets you define named variables in a formula.

Excel formula: LAMBDA replace characters recursive

For example, =MID(“apple”,2,3) returns “ppl”.

MATCH supports approximate and exact matching, andwildcards(* ?)

Excel formula: Strip numeric characters from cell

Excel LAMBDA function

Excel LET function

Excel MID function

Excel MATCH function

Excel ISNUMBER function