• About
  • Contact
  • Privacy Policy
  • Submit For Review
  • Template Gallery
  • Excel 2016 Udemy Course
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

TheAppTimes

App Reviews, Tutorials, & Gadget News Hub

  • Gadgets
  • How To
  • Mobile Apps
  • Software and Web Apps
  • Buying Guides
  • Show Search
Hide Search
Home » How To » How to Remove Spaces in Excel 2010 (Leading, Trailing or All)

How to Remove Spaces in Excel 2010 (Leading, Trailing or All)

February 21, 2011

If you are in the habit of copying content from other spreadsheet or from a website to your Excel database, you might often be faced with the situation where the copied content display additional spaces either the beginning or end of a string. You may also find extra spaces within a string. In this Excel 2010 tutorial, you will learn how to remove spaces in excel (leading, trailing, or all )  under different circumstances.

How to Remove Spaces in Excel Using TRIM Function (Leading & Trailing Spaces)

1. Place the cursor in the cell where you want the result to appear.

2. Type =TRIM(Cell Reference) and press Enter.

How to Remove Spaces in Cells using TRIM

The result is that text will now remove all leading and trailing spaces, as well as extra spaces in the middle of a string.

There may be times when the TRIM function does not work. For instance, when data is copied from a HTM page, the spaces in the cells are nonbreaking spaces with a decimal character code of 160 rather than a ASCII space decimal character code of 32. In such cases, you will have to use the formula

=TRIM(SUBSTITUTE(Cell Reference,CHAR(160),CHAR(32)))

trim non breaking spaces

Remove Spaces In Excel Between Words Using Find and Replace Functionality

If you need to remove extra spaces between words you can make use of the Find and Replace functionality. This will also remove leading and trailing spaces by one space but won’t completely remove them.

1. Select the range of cells where you want to remove the extra spaces.

2. Press Ctrl+H to display the Find and Replace dialog box.

3. In the Find what text place, click and hit the Space Bar twice.

ALSO READ:  Learn Excel: How to Use the Excel Count Function

4. In the Replace with text box, place the cursor and make sure the box is empty.

5. Then click Replace All.

Remove Space In Excel Between Numbers Using Find and Replace Functionality

If your workbook has numbers where there are spaces between the digits (thousands, millions, billions), Excel will read them as text rather than numbers and you won’t be able to perform any mathematical operations on them.

1. Select the range of cells where you want to remove spaces in excel workbook.

2. Press Ctrl+H to display the Find and Replace dialog box.

3. In the Find what text place, click and hit the Space Bar.

4. In the Replace with text box, place the cursor and make sure the box is empty.

5. Then click Replace All.

Remove Spaces In Excel Between Words

There may be times when you want to remove spaces in cells. In such situations you can use the formula =SUBSTITUTE(A1," ","")

remove spaces in excel completely

Use a Third Party Tool to Remove Extra Spaces in Excel

If you routinely copy and paste data and need to clear extra spaces on a regular basis, using a third party tool would be more handy. One tool that I can recommend is Cell Cleaner ($19.95) from Ablebits. It has a 15 day free trial version for you to try before you decide to buy. Cell Cleaner can:

  • Trim leading, trailing, and excess spaces between words.
  • Change text case to Proper, UPPER, or lower.
  • Convert numbers in text format to number format.
  • Remove or replace unwanted and non-printing characters.
Tweet2
Share2
WhatsApp
Pin
Buffer2
6 Shares

Filed Under: How To Tagged With: excel how to

You May Also Like

Ways to Use Excel Mobile - TATFI
10 Creative Ways to Use Excel Mobile in your Business
How to Get Rid of the Paste Options Menu in Word, Excel and PPT
How to Get Rid of the Paste Options Menu in Word, Excel and PPT
How to Calculate Number of Days Between Two Dates in Excel
How to Calculate Number of Days Between Two Dates in Excel

About Adeline Gear

Adeline is a tech enthusiast who loves exploring the latest tools and applications in the marketplace. She also loves her Android and spends time reviewing apps and playing games when she has the time.

Reader Interactions

Comments

  1. Vernessa Taylor says

    February 22, 2011 at 5:36 pm

    Hello Eddie,

    Your Excel series is wonderful! I use both Excel and OpenOffice Calc (as well as Gnumeric in Linux) and your tips seem to work for Calc and Gnumeric, too. Thanks!

    Reply
  2. Kim says

    September 27, 2011 at 3:29 am

    What about spaces in numbers? If I want to convert something like this:
    703784 1394850 00330 7

    to:
    7037841394850003307

    Is there a way to do it?

    Reply
    • somnath says

      September 28, 2011 at 12:41 pm

      Use find & replace
      find space & replace with blank

      Reply
    • Christian says

      October 28, 2011 at 5:51 pm

      Kim you could use the function substitute to find the space and replace it with non space.

      for instance: =SUBSTITUTE(A1;” “;””)

      Reply
  3. Pat says

    February 10, 2012 at 11:17 pm

    Thank you for the above answer on how to remove the excess spaces. Now, I’ve got a question about how to make that new column of space-less data into a useable column of data and not just of a formula. What I’d like to do is be able to replace the old column of data with this new column without all the spaces. Can it be done?

    Reply
  4. Doug says

    February 12, 2012 at 6:05 am

    Good lesson, I never knew there was a “trim” function and I thought I knew excel well… This would have come in handy during many a project in my past… I’m seeing it a little too late, but will likely use it in the future

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Hottest New Gadgets!

Best e Readers to Buy in 2023 - TATFI

5 Best eReaders to Buy in 2023

Amazfit Falcon Smartwatch - TATFI

The Amazfit Falcon is a Military Grade Smartwatch with Premium Looks and Great Features

Couchmaster Cyboss Ergonomic Couch Desk - TATFI

Couchmaster Cyboss is an Ergonomic Desk to Keep Off Neck Pain

Philips Hue Festavia String Lights - TATFI

Add a Bit of Sparkle to Your Christmas Tree with Philips Hue Festavia String Lights

Samsung Galaxy Tab A7 Lite Kids Edition - TATFI

This Kid Friendly Tablet from AT&T is a Thoughtful Gift for Your Little One This Christmas

Is An iPhone Really Worth It - TATFI

Is an iPhone is Really Worth It?

Devices You Might Want to Try - TATFI

4 Fantastic Devices You Might Want to Try

Popular Tags

android android apps android games android how to apple casino games chrome extensions excel excel how to facebook gadgets gaming gmail google instagram ios apps ios games ios how to ios tips ipad iphone kids apps learn excel management microsoft music apps new releases outlook how to photo apps powerpoint powerpoint how to productivity Samsung security smartphone smartphones software tablet tablets twitter web browsers windows 10 word how to xbox youtube

Disclosure

TheAppTimes is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
How to improve writing skills with apps - TATFI

How to Improve Writing Skills with Apps and Gadgets

Samsung Galaxy S10 Unlocked - TATFI

The Samsung Galaxy S10 Unlocked– Your Key to Total Freedom

Make Money Playing at Fairspin Online Casino - TATFI

Make Money Playing at Fairspin Online Casino

How Mobile Wellbeing Apps are Empowering Patients - TATFI

How Mobile Wellbeing Apps are Empowering Patients

Tips to Boost Your Ranking and Sales on Etsy - TATFI

5 Ways to Boost Your Ranking and Sales on Etsy

PunchBee Time Management App - TATFI

Know How You Spend Your Time with PunchBee

DevOps Model Explained - TATFI

The Complete Guide to DevOps: How the Model Works and Who It Benefits

Approaches to Digital Marketing - TATFI

Blending Technical and Content-Centric Approaches to Digital Marketing

Tech Tips For Startups - TATFI

Useful Tech Tips For Startups

Boox Tab X Android eReader - TATFI

Boox Tab X is an Android eReader That Helps You Do More Than Just Read

Best Translation Apps for Android - TATFI

5 Great Translation Apps for Android

Dynamic Island Feature on Your Android - TATFI

How to Get the Dynamic Island Feature on Android

TheAppTimes © 2023 // Runs on StudioPress