Sunday, 25 September 2022

Excel text function || FIND, SEARCH, REPLACE, SUBSTITUTE

FIND

Excel FIND function will provide the position(As a number) of one text string within another text string. FIND is a case-sensitive. Reading is from left to right.

Syntex

                =FIND (find_text, within_text, [start_num])

Arguments 

                Find_text - The text to find.

                Within_text –The input text to search.

                [Start_num]- [optional] The starting position in the text to search. defaults to 1.

SEARCH                                               

Excel SEARCH function will provide the position(As a number) of one text string within another text string. SEARCH is not a case-sensitive. Reading is from left to right.

Syntex

                =SEARCH (find_text, within_text, [start_num])

Arguments 

                Find_text - The text to find.

                Within_text –The input text to search.

                [Start_num] - [optional] The starting position in the text to search. defaults to 1.

REPLACE

Excel REPLACE function will replace a part of text string with different text string. REPLACE is not a case-sensitive

Syntex

                =REPLACE (old_text, start_num, num_chars, new_text)

Arguments 

old_text – selection of text which require replacement.

start_num - The starting location in the text from where replacement require.

num_chars - The number of characters to be replace.

new_text - text to replace old_text with.

SUBSTITUTE

Excel SUBSTITUTE function will replace existing text with new text string in given text. SUBTITUTE function is a case-sensitive.

Syntex

=SUBSTITUTE (text, old_text, new_text, [instance])

Arguments 

text - The text to change.

old_text - The text to replace.

new_text - The text to replace with new text

[instance] - [optional] The instance to replace. If not supplied, all occurrence are replaced. i.e. if 1 is provided then first occurrence is replaced, remaining occurrence  will not change, if 2 is written then only second occurrence is replaced remaining occurrence will not change.

Practice file download