Skip to main content

Excel: How to remove duplicates ignore spaces

Here is a list that includes some duplicate values, when you use the Remove Duplicates feature in Excel to remove the duplicate values, some duplicates will keep if there are some spaces as the below screenshot shows.
doc fix divide zero error 1

If you want to remove duplicates ignore the extra spaces, below tutorial will help you.

Remove duplicates ignore spaces with Excel built-in feature

Remove duplicates ignore spaces with a handy add-in tool


Remove duplicates ignore spaces with Excel built-in feature

Firstly, use TRIM function to remove all extra spaces from the list.

1. Select a cell next to the list, and type the TRIM function:

=TRIM(B2)

Press Enter key and then drag the auto-fill handle down.
doc fix divide zero error 1

Now all extra spaces are removed from the list.

2. Now remove the duplicates. Select the formula list, click Data > Remove Duplicates, in the popping Remove Duplicates Warning dialog, check Expand selection option, then click Remove Duplicates button.
doc fix divide zero error 1
doc fix divide zero error 1

3. Then in Remove Duplicates dialog, only check the formula list column in the Columns list. Click OK.
doc fix divide zero error 1

4. A dialog pops out to remind you of the number of found duplicates, click OK to close.

Now all duplicates ignore spaces have been removed. And remove the TRIM function column later if you do not need it anymore.
doc fix divide zero error 1


Remove duplicates ignore spaces with a handy add-in tool

If you have Kutools for Excel installed, there are some features also can quickly solve this job.

1. Select the list, click Kutools > Text > Remove Spaces. And in the Remove Space dialog, choose All excess spaces option. Click Ok.
doc fix divide zero error 1

Now all extra spaces in the list have been removed.

2. Then click Kutools > Select Duplicate & Unique Cells.
doc fix divide zero error 1

3. In the Select Duplicate & Unique Cells dialog, check Each row option and Duplicates or All duplicates options as you need. Click Ok. A dialog pops out to tell you how many rows have been selected. Click OK.
doc fix divide zero error 1 doc fix divide zero error 1

Now all duplicate values have been selected, press Delete key.
doc fix divide zero error 1

For all features about Kutools for Excel, please visit here.

For free 30-day trial, please download now.

.

Other Operations (Articles)

How To Fix/Lock Background Color In A Sheet
Sometimes, when you share a sheet with others to edit, you may want to lock the background color in a range of cells and prevent them to be changed.

How To Fix Broken Links
In a workbook, sometimes, you may create links to other workbooks for referring to some relevant information. But when the source workbook is renamed or moved to another location, these extra links will be broken.

Excel: How To Create Or Insert A Bookmark
Have you ever imagined creating or inserting a bookmark for quickly jumping to a specific data range while there is a lot of data in a worksheet or a workbook?

How to apply shading to odd or even (alternative) rows/columns in Excel?
While designing a worksheet, many people tend to apply shading to odd or even (alternative) rows or columns in order to make the worksheet more visual. This article will show you two methods to apply shading to odd or even rows/columns in Excel.


  • 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 and Keeping Data; Split Cells Content; Combine Duplicate Rows and Sum/Average... 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...
  • Favorite and Quickly Insert Formulas, Ranges, Charts and Pictures; Encrypt Cells with password; Create Mailing List and send emails...
  • 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...
  • Pivot Table Grouping by week number, day of week and more... Show Unlocked, Locked Cells by different colors; Highlight Cells That Have Formula/Name...
kte tab 201905
  • 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
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations