The solution only works in Excel for Microsoft 365Īs you probably know, Excel 365 has a special function that enables you to create your own functions, including those that calculate recursively. The next example demonstrates a more compact and elegant solution. Nested SUBSTITUTE functions work fine for a reasonable number of characters, but if you have dozens of characters to remove, the formula becomes too long and difficult to manage. The same can be done with the help of the CHAR function, where 161 is the character code for "¡" and 191 is the character code for "¿": SUBSTITUTE(SUBSTITUTE(SUBSTITUTE( cell, char1, ""), char2, ""), char3, "")įor example, to eradicate normal exclamation and question marks as well as the inverted ones from a text string in A2, use this formula:
0 Comments
Leave a Reply. |