The second formula is more complex and makes sense if you don’t have TEXTBEFORE.

This formula is a great example of hownew functionssimplify previously complex Excel problems.

The traditional formula is more complicated than the modern approach.

Find the the position of each asterisk by changing n

Functions likeFINDandSEARCHare good at returning positions, but they cannot specify which instance of a character you want.

They always find thefirstinstance.

By default, it is set to1, meaning the first occurrence.

Find the the position of each asterisk by changing n

To find a different occurrence of a character, simply change the instance numbernand adjust thedelimiteras needed.

The formula works as follows:

This approach is effective but less intuitive than using TEXTBEFORE.

It’s important that you use a unique marker that doesn’t appear in the text string.

Find the the position of each asterisk by changing n

Customizing the traditional formula

The same formula structure can be used with a different delimiter.

When the text is not found, FIND returns a #VALUE error.

TEXTBEFORE Function

The Excel TEXTBEFORE function returns the text that occurs before a given substring or delimiter.

Find the the position of each asterisk by changing n

LEN will also count characters in numbers, but number formatting is not included.

Excel TEXTBEFORE function

Find the the position of each asterisk by changing n

Excel formula: Extract nth word from text string

Excel formula: Replace one character with another

Excel formula: Extract last two words from cell

Excel formula: Remove last word

Excel SUBSTITUTE function

Excel FIND function

Excel TEXTBEFORE function

Excel LEN function

Article image

Find the the position of each asterisk by changing n