USE THE SUBSTITUTE FUNCTION TO SUBSTITUTE PARTS OF A CELL USING MICROSOFT EXCEL


In this example, the “-” character needs to be replaced with a blank space. But only the first occurrence of this character should be replaced. To do this, type any kind of text and numbers in column A as shown in the screenshot below, using the “-” character in different positions and in a variety of occurrences.

To substitute parts of a cell:

1. Select cells B2:B10 and type the following formula: =SUBSTITUTE(A2,"-","",1).
2. Press <-Ctrl+Enter->.

USE THE SUBSTITUTE FUNCTION TO SUBSTITUTE PARTS OF A CELL USING MICROSOFT EXCEL
Note: If you want to substitute the second occurrence of this character, use the following formula: =SUBSTITUTE(A2,"-","",2).

No comments:

Post a Comment