Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to replace all after/before specific character or space in Excel?

For example you have a list of text strings as below screenshot shown, and now you need to replace all characters after the specific “b” with another text string in Excel. Any idea to solve it in Excel quickly? This article will introduce two easy solutions for you.

 

Replace all after/before specific character or space with Find and Replace feature

Replace all after/before specific characters of space with Kutools for Excel

Remove characters from beginning/right/end in cells

Kutools for Excel's Remove By Position feature eases you removing certain number of characters from beginning/end/specified position of text string in cells. Full Feature Free Trial 30-day!

module remove by position 6

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

arrow blue right bubble Replace all after/before specific character or space with Find and Replace feature


This method will introduce the Find and Replace feature to easily replace all characters after or before specified one in Excel. Please do as follows:

1. Select the list you will replace all after/before the specific characters, and press the Ctrl + H keys simultaneously to open the Find and Replace dialog box.

Note: You can also open the Find and Replace dialog box by clicking Home > Find & Select > Replace.

2. In the Find and Replace dialog box, please do as follows:

(1) In the Find what box, please type b*;

Note: b is the specific character you will replace all characters after. To remove all before the specific character, please type *b into the Find what box. To replace all characters after (before) space, please type a space and * (or * and a space) into this box.

(2) In the Replace with box, please type the text string you will replace with.

(3) Click the Replace All button.

3. Now a dialog box will come out and show how many replacements it has made. Just click the OK button to close it. And then close the Find and Replace dialog box.

And now in our example you will see all characters after b has been replaced with the specified text in the selected cells. See screenshot:

Note: This method does not work if you want to replace all characters after/before wildcards (* and ?).


arrow blue right bubble Replace all after/before specific characters of space with Kutools for Excel

No mater replacing all characters after/before a normal character (such as letter, number, etc.), or replacing all after/before special character (such as *, ?, etc.), Kutools for Excel can help you easily get it done in Excel.


1. Select the list of text strings you will replace all before/after the specific character, and click Kutools > Text > Split Cells.

doc replace all after before character 01

2. In the opening Split Cells dialog box, please check the Split to Columns option, check the Other option and type the specific character (we type the asterisk * in our example) into below box, and click the Ok button. See screenshot:

In the second Split Cells dialog box please specify the first cell of destination range and click the OK button.

And then you will see the list of text strings are split into two columns. See screenshot:

doc replace all after before character 7

3. Select the first column of two split columns, and click Kutools > Text > Add Text.

doc replace all after before character 02

4. In the opening Add Text dialog box, type the text you will replace with into the Text box, check the After last character option, and click the Ok button. See screenshot:

And then you will see the specified text replace all characters after the specific character (asterisk in our case). See screenshot:

doc replace all after before character 10

Note: To replace all before the specified character, please select the second column of both split column in Step 3, and check the Before first character option in Step 4. See screenshot:

doc replace all after before character 12

Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now


Kutools for Excel includes more than 300 handy tools for Excel, free to try without limitation in 30 days. Download and Free Trial Now!

arrow blue right bubbleRelated articles:


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Ricardo Nunes · 1 years ago
    Por favor, como exemplo - Tenho na célula "b8" a seguinte informeção ( 1.00E-3 % 10) e preciso que fiquem apenas os valores significativos (1.00E-3) sem os espaços inicial, sem o caractere % e o espaço e o valor que se segue ( 10), porém ao utilizar a fórmula =SUBSTITUIR(SUBSTITUIR(SUBSTITUIR(B8;".";",");" %*";"");" *";"") retorna apenas a substituição do ponto pela virgula. Sabe informar o que está errado, ou se tem alguma outra forma de resolver isso?