EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Certification Courses
  • 120+ Courses All in One Bundle
  • Login
Home Excel Excel Resources Excel Tips Excel Remove Spaces
Secondary Sidebar
Excel Functions
  • Excel Tips
    • Recover Document in Excel
    • Excel Shortcut to Select Row
    • Excel Header Row
    • Excel Insert Button
    • Excel Translate
    • Budget in Excel
    • KPI Dashboard in Excel
    • Blank Invoice Excel Template
    • Write Formula in Excel
    • Auditing Tools in Excel
    • Autofit Row Height in Excel
    • Formatting Text in Excel
    • Add Rows in Excel Shortcut
    • Divide Cell in Excel
    • Compare Two Columns in Excel for Matches
    • Excel Troubleshooting
    • Unprotect Excel Workbook
    • Subtract Date in Excel
    • Carriage Return in Excel
    • Negative Numbers in Excel
    • Worksheets in Excel
    • Excel Match Multiple Criteria
    • Exponential Moving Average Formula
    • Sentence Case in Excel
    • Excel Reverse Order
    • Excel Timesheet Template
    • Weighted Average in Excel
    • CTRL Shift-Enter in Excel
    • Excel Expense Tracker
    • INDEX MATCH Function in Excel
    • Percent Change in Excel
    • Drag and Drop in Excel
    • Shade Alternate Rows in Excel
    • Excel Database Template
    • Inverse Matrix in Excel
    • New Line in Excel Cell
    • Format Cells in Excel
    • Excel Text with Formula
    • Project Management Template in Excel
    • Vlookup vs Index Match
    • Embedded in Excel
    • Count Colored Cells in Excel
    • Excel Hacks
    • Column Header in Excel
    • Database Function in Excel
    • Excel Spell Check
    • Linear Interpolation in Excel
    • Convert Excel to CSV
    • Excel Not Responding
    • Delta Symbol in Excel
    • Excel Mortgage Calculator
    • Excel Show Formula
    • Break Links in Excel
    • VLOOKUP Examples in Excel
    • Alternate Row Color Excel
    • Checklist in Excel
    • Microsoft Office Tips
    • Excel vs Access
    • Excel Change Case
    • Count Characters in Excel
    • Formula Bar in Excel
    • Invoice Template in Excel
    • Find and Replace in Excel
    • PowerPivot in Excel
    • Wildcard in Excel
    • Line Break in Excel
    • NULL in Excel
    • Text Formula in Excel
    • Family Tree in Excel
    • Insert Calendar in Excel
    • Page Setup in Excel
    • Search For Text in Excel
    • Switching Columns in Excel
    • 3D Cell Reference in Excel
    • Roadmap Template in Excel
    • Cell References in Excel
    • Excel Automation
    • Matching Columns in Excel
    • Evaluate Formula in Excel
    • How to Find Mean in Excel
    • How to Add Cells in Excel
    • Project Timeline in Excel
    • TODAY Formula in Excel
    • Poisson Distribution in Excel
    • YEAR Formula in Excel
    • REPLACE Formula in Excel
    • Create Spreadsheet in Excel
    • SEARCH Formula in Excel
    • HYPERLINK Formula in Excel
    • Pivot Table with Multiple Sheets
    • COLUMNS Formula in Excel
    • DAY Formula in Excel
    • RIGHT Formula in Excel
    • INDIRECT Formula in Excel
    • Excel IRR Formula
    • Pivot Table Sort
    • OR Formula in Excel
    • Pivot Table Formula in Excel
    • How to Edit Drop Down List in Excel?
    • WEEKDAY Formula in Excel
    • Chart Wizard in Excel
    • Time Difference in Excel
    • Lookup Table in Excel
    • SUBTOTAL Formula in Excel
    • LOOKUP Formula in Excel
    • Themes in Excel
    • Group Worksheets in Excel
    • Excel ISNUMBER Formula
    • 3D Maps in Excel
    • VLOOKUP Tutorial in Excel
    • Moving Columns in Excel
    • Grouping Columns in Excel
    • Excel Formula of Percentage
    • Excel Leading Zeros
    • Timesheet in Excel
    • Nested IF Formula in Excel
    • SUMIF Formula in Excel
    • Concatenation in Excel
    • Excel Insert Page Break
    • LEN Formula in Excel
    • Insert Comment in Excel
    • Excel Print
    • Fractions in Excel
    • Excel Add a Column
    • Borders in Excel
    • Excel Sum by Color
    • Excel vs Google Sheets
    • Calculate Percentage Increase in Excel
    • Excel Format Phone Numbers
    • Excel Search Box
    • Excel vs CSV
    • Excel vs Numbers
    • Excel Concatenate Date
    • Excel Bullet Points
    • Calculate Compound Interest in Excel
    • Find External Links in Excel
    • Excel Comma Style
    • Excel Remove Leading Spaces
    • Combine First and Last Name in Excel
    • How to Calculate Ratio in Excel
    • SUMPRODUCT Function with Multiple Criteria
    • Create Excel Template
    • Excel Greater than or Equal
    • Excel Keyboard Shortcuts
    • Excel Row vs Excel Column
    • Excel Operators
    • Excel Text Compare
    • Excel Uppercase Function
    • Excel Auto Numbering
    • Watermark in Excel
    • Excel Delete Row Shortcut
    • Excel Word Count
    • Row Count in Excel
    • Excel Grade Formula
    • Excel Percentage Difference
    • Excel Rows and Columns
    • Excel Group
    • Excel Move Columns
    • Excel Row Height
    • Excel Sparklines
    • Excel Drawing a line
    • Multiple IFS in Excel
    • Excel Strikethrough
    • Numbering in Excel
    • Share Excel Workbook
    • Excel Shortcut For Merge Cells
    • Excel OneDrive
    • Excel Track changes
    • Excel Hide Formula
    • Excel Filter Shortcuts
    • Excel 3D Reference
    • Protect Excel Workbook
    • Excel Moving Averages
    • Excel Row Limit
    • Excel Absolute Value
    • Excel Print Area
    • Excel Format Painter
    • Excel Separate text
    • Excel Autofit
    • Excel Columns to Rows
    • Excel Paste Shortcut Option
    • Excel Rows to Columns
    • Excel Insert Row Shortcut
    • Excel Extensions
    • Excel Unmerge Cells
    • Divide in Excel Formula
    • Excel Compare Two Columns
    • Not Equal To Excel
    • Excel Remove Duplicates
    • Excel Remove Spaces
    • Excel Calculate Age
    • Copy Excel Sheet
    • Excel Conditional Formatting Based on Another Cell Value
    • Excel Cell Reference
    • Excel Split Cell
    • Excel Circular Reference
    • Highlight Every Other Row in Excel
    • Errors in Excel
    • Excel Delete Pivot Table
    • Excel Pivot Table
    • Subtraction in Excel
    • Count Unique Values in Excel
    • Excel Highlight Duplicates
    • Excel Data Formatting
    • Random Numbers in Excel
    • Basic Excel Formulas
    • Page Numbers in Excel
    • Excel CAGR Formula
    • Excel Combine cells
    • IFERROR with VLOOKUP in Excel
    • Column Sort in Excel
    • Print Comments in Excel
    • Cheat Sheet of Excel Formulas
    • Remove Hyperlinks in Excel
    • Excel Drop Down List
    • Remove (Delete) Blank Rows in Excel
    • Relative Reference in Excel
    • Subscript in Excel
    • Superscript in Excel
    • Excel Insert Multiple Rows
    • Excel Absolute Reference
    • Unhide Columns in Excel
  • Excel Functions (12+)
  • Excel Tools (114+)
  • Financial Functions in Excel (17+)
  • Logical Functions in Excel (14+)
  • Lookup and Reference Functions in Excel (35+)
  • Maths Function in Excel (47+)
  • TEXT and String Functions in Excel (26+)
  • Date and Time Function in Excel (24+)
  • Statistical Functions in Excel (59+)
  • Information Functions in Excel (4+)
  • Excel Charts (56+)
  • Workplace Productivity (4+)
  • Microsoft Office Tools (15+)
  • Excel Formula and Functions (22+)
  • MS Excel Shortcuts (4+)
Excel Functions Courses
  • EXCEL COURSE
  • Online Excel Data Analysis Course
  • Excel for Finance Course

Excel Remove Spaces

By Pradeep SPradeep S

Remove Spaces in Excel

Excel Remove Spaces (Table of Contents)

  • Introduction to Remove Spaces in Excel
  • Different Types Of Spaces
  • How to Remove Extra Spaces in Excel?

Introduction to Remove Spaces in Excel

There are multiple ways to remove spaces in excel. The first way we can remove the extra unwanted spaces with the help of the FIND and REPLACE option (Ctrl + H). There we need to put a space and replace that with Blank (Nothing kept). This removes the spaces anywhere from the selected cells. In another way, we can remove the spaces by using a TRIM function. This removes the spaces which are there at the start and end of the selected cell content. And we can also use the SUBSTITUTE function, where we can substitute space with blank to remove spaces completely.

Different Types Of Spaces

  • It may contain extra spaces before text strings in cells; these spaces are called Leading spaces.

Leading Space

  • It may contain extra spaces after text strings in cells; these spaces are called Trailing spaces.

Trailing space

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

  • Datasets may contain extra in-between spaces, i.e.additional spaces in between text.

Extra in-between space

  • Datasets may also contain Line breaks with extra space.

Line breaks with extra space

We can get rid of these types of spaces quickly & easily with the below-mentioned options:

  • FIND AND REPLACE
  • TRIM Function
  • SUBSTITUTE Function
  • CLEAN and TRIM function to Remove Extra Space of Line Break in excel

TRIM Function

TRIM function is a prebuilt integrated function categorized under Text functions. It Removes all extra spaces from text except a single space between words in excel.

The syntax or formula for the TRIM function in Excel is:

TRIM Formula

Trim function in Excel has only one compulsory argument or parameter, i.e. text.

  • Text: It is cell content from where you need to remove extra spaces in excel.

The TRIM function only removes the ASCII space character (32) from the text.

How to Remove Extra Spaces in Excel?

Remove extra spaces in Excel is very simple and easy. Let’s understand the working of removing extra spaces in excel with the help of some examples.

You can download this Remove Spaces Excel Template here – Remove Spaces Excel Template

Example #1 – Remove Excel Spaces with the help of Find and Replace

In the below-mentioned example, I have a dataset in column D that contains all three types of extra spaces, i.e. Leading spaces, Trailing spaces & Extra in-between spaces.

For reference, I have done a number of character count for the column D datasets. With the help of the LEN function in column E., I have taken this raw data to another new column (column H) to apply the Find and Replace task.

Example 1

Now, I have to select the cell range where the Find and Replace parameter needs to be applied to remove extra spaces in excel.

Remove Spaces Example 1-2

Now, to activate the find and replace option, press the shortcut key Ctrl + H, find and replace window appears.

Remove Spaces Example 1-3

In Find what: input bar, insert a blank space with the help of the space bar once, and in Replace with no need to input anything, it should remain blank. Click on the Replace All button.

Remove Spaces Example 1-4

It replaces all the blank spaces in the cell.

Remove Spaces Example 1-5

You can find a difference in character count between both datasets. Where Find and Replace remove all the blank spaces. In extra in-between spaces content also, it has removed all the blank spaces without retaining a single space between words (This can be rectified with the help of TRIM function).

Result of Example 1

Note: This method is only used when you want to remove a leading & trailing type of extra spaces from selected cells or to remove all the spaces in the data range from excel completely.

Example #2 – Remove Excel Spaces with the help of TRIM Function

In the below-mentioned example, I have a dataset in column D that contains all three types of extra spaces, i.e. leading spaces, trailing spaces & extra in-between spaces.

For reference, I have done a number of character count for the column D datasets. With the help of the LEN function in column E., I have taken this raw data to another new column (column G) to apply the TRIM Function. The Excel TRIM function removes all spaces from text except a single space between words.

Example 2

Now, In cell H4, let’s apply a TRIM function.

Remove Spaces Example 2-2

In the Formulas tab, click the Text drop-down menu in the Functions section and select TRIM.

Remove Spaces Example 2-3

Now the function argument dialog box appears, click on the cell G4, which contains the text where I would like to remove spaces to complete the function, then click on OK.

Remove Spaces Example 2-4

Now, you can observe in cell H4, where trim function removes leading space in that cell.

Remove Spaces Example 2-5

Similarly, a TRIM function is applied to other range by selecting the cell H4 and drag it to H9 and click Ctrl+D to apply to the rest of the cells.

Remove Spaces Example 2-6

You can find a difference in character count between both datasets where TRIM Function removes all spaces before and after the text in the cell (i.e. G4, G5, G6 & G7) & consecutive spaces in the middle of a string in the cell G8 & G9.

Result of Example 2

Example #3 – Remove Excel Spaces with the help of SUBSTITUTE Function

It will remove all the extra excel spaces, including single spaces between words or numbers.

In the below-mentioned example, I have a dataset in column D that contains all three types of extra spaces, i.e. leading spaces, trailing spaces & extra in-between spaces.

For a reference purpose, I have done a number of character count for the column D datasets. With the help of the LEN function in column E., I have taken this raw data to another new column (column G) to apply the SUBSTITUTE Function.

Example 3

Now, In cell H4, let’s apply the SUBSTITUTE Function.

Remove Spaces Example 3-2

In a Formulas tab, click the Text drop-down menu in the Functions section and select SUBSTITUTE.

Remove Spaces Example 3-3

Now the function argument dialog box appears:

All in One Excel VBA Bundle(120+ Courses, 30+ Projects)
Basic ExcelAdvanced ExcelVBA & MacrosExcel Dashboards
Pivot TablesStatistical FunctionsFinancial FunctionsCharts & Graphs
Price
View Courses
120+ Online Courses | 30+ Projects | 500+ Hours | Verifiable Certificates | Lifetime Access
4.9 (64,768 ratings)
  • Text Click on the first cell in the column that you need to be changed.
  • In the Old_text, I need to enter the character that needs to be replaced; it should be entered between double-quotes. i.e. for removal of spaces, it will be ” “.
  • Here, in the New text, I don’t want to replace anything; therefore, it is typed as “”.

Remove Spaces Example 3-4

Now, you can observe in cell H4, where the Substitute function removes leading space in that cell.

Remove Spaces Example 3-5

SUBSTITUTE Function is applied to other ranges by selecting the cell H4 and drag it till H9 and click Ctrl+D so that it is applied to other cells.

Remove Spaces Example 3-6

You can find a difference in character count between both datasets. Substitute Function removes all the blank spaces; in extra in-between spaces content, it has removed all the blank spaces without retaining a single space between words.

Result of Example 3

Things to Remember about Excel Remove Spaces

  • Since the extra space is also a character, therefore in ASCII (American Standard Code for Information Interchange) encoding, it has code number 32.
  • Sometimes, the data appears as line breaks which may contain extra spaces between words; To remove those extra space, we can combine Excel TRIM and CLEAN function to Remove the Extra Space of Line Break.

Recommended Articles

This has been a guide to Remove Spaces in Excel. Here we discuss how to Remove Extra Spaces in Excel along with practical examples and a downloadable excel template. You can also go through our other suggested articles –

  1. Address Excel Function
  2. SUBSTITUTE Function in Excel
  3. LEN Function in Excel
  4. Excel SEARCH Function
Popular Course in this category
Excel Training (23 Courses, 9+ Projects)
  23 Online Courses |  9 Hands-on Projects |  110+ Hours |  Verifiable Certificate of Completion
4.9
Price

View Course

Related Courses

Excel Data Analysis Training (17 Courses, 8+ Projects)4.9
Excel for Finance Training (18 Courses, 7+ Projects)4.8
1 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download Remove Spaces Excel Template

EDUCBA

Download Remove Spaces Excel Template

EDUCBA

डाउनलोड Remove Spaces Excel Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more