How to replace the last or first character of the string in excel?
There are various use cases to remove the tail end character, like replacing the alias name, ex: 16 seconds or 16s to 16. It can be trimmed using the excel in-built function called “Replace”.
Replace function syntax:
REPLACE(old_text, start_num, num_chars, new_text) Old_text Required. Text in which you want to replace some characters. Start_num Required. The position of the character in old_text that you want to replace with new_text. Num_chars Required. The number of characters in old_text that you want REPLACE to replace with new_text. New_text Required. The text that will replace characters in old_text.
Excel formula to replace the last character:
=(REPLACE(B3, LEN(B3), LEN(B3), ""))
Excel formula to replace the first character:
=(REPLACE(C3, 1, 1, ""))
Leave a comment