Delete ALL text to the left of a particular charac

2019-04-26 10:07发布

问题:

This is an excel related question. I want to delete all text (all characters) to the left of a particular character or characters in the string.

For instance:

suppose I have an string in a cell helloall welco metostackoverflow

now I want delete all the characters which are at the left side of "stack". means result should be stackoverflow (only stackoverflow)

Thanks in advance for your support.

回答1:

=RIGHT(input,LEN(input)-FIND("stack",input)+1)


回答2:

Another formula: =MID(input,20,60)

Here 1st numeric is 20 because "s" in "helloall welco metostackoverflow" is the 20th character from left considering each space also a character. 2nd numeric( 60 here) is any number greater than the numbers of characters in desired text "stackoverflow". In "stackoverflow" there are 13 characters. So in the given formula 2nd numeric can be any positive integer equal or greater than 13.



回答3:

do a find replace and use a wildcard.

e.g.

Find: *Stack Replace: Stack

Result would be "Stack Overflow"