Explanation

The REPLACE function will replace text by position.

In this case, we want to remove the labels that appear inside text.

Each label is followed by a colon and a space.

Excel formula: Remove text by position

We can use the colon as a “marker” to figure out where the label ends.

For example =REPLACE(“XYZ123”,4,3,“456”) returns “XYZ456”.

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

Excel formula: Remove text by matching

Excel formula: Remove last word

Excel REPLACE function

Excel FIND function