Return the characters after Nth character in a Cell



Return the characters after the nth ","|"."



Use of SUBSTITUTE function when you are replacing text based on its content.

SUBSTITUTE find and replaces your old text with new text in a text string. 


SUBSTITUTE(text, old_text, new_text, [instance_number])

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.
Old text  Required. The text you want to replace.
New text  Required. The text you want to replace old text with.
Instance number  Optional. Specifies which occurrence of old text you want to replace with new text. If you specify instance number, only that instance of old text is replaced. Otherwise, every occurrence of old text in text is changed to new text.

REPT :- Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string.


REPT(text, numbertimes)

Text  Required. The text you want to repeat.
Number times  Required. A positive number specifying the number of times to repeat text.

TRIM :-


TRIM(text)

Text  Required. The text from which you want spaces removed.




Return the characters after 10th character 


=TRIM(RIGHT(SUBSTITUTE(G2,"|",REPT(" ",11255),10),11255))
=TRIM(RIGHT(SUBSTITUTE(G3,".",REPT(" ",11255),10),11255))
=TRIM(RIGHT(SUBSTITUTE(G4,",",REPT(" ",11255),10),11255))

Comments

Popular posts from this blog

50 Excel VBA Oral Interview Questions