---
title: "Remove extra spaces with TRIM | PracticeExcel"
description: "Practice TRIM in a live spreadsheet: remove the extra spaces from an imported name."
canonical_url: "https://practiceexcelonline.com/practice/trim-proper-upper/trim-extra-spaces"
locale: en
meta:
  "og:description": "Practice TRIM in a live spreadsheet: remove the extra spaces from an imported name."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_Remove%2Bextra%2Bspaces%2Bwith%2BTRIM%2Cdescription_~UHJhY3RpY2UgVFJJTSBpbiBhIGxpdmUgc3ByZWFkc2hlZXQ6IHJlbW92ZSB0aGUgZXh0cmEgc3BhY2VzIGZyb20gYW4gaW1wb3J0ZWQgbmFtZS4%2Ceyebrow_~VFJJTSwgUFJPUEVSIGFuZCBVUFBFUg%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiXSwicm93cyI6W3sibiI6MSwiY2VsbHMiOlsiTmFtZSBhcyBpbXBvcnRlZCIsIkNsZWFuIG5hbWUiXX0seyJuIjoyLCJjZWxscyI6WyIgIEFubmEgICBCZXJnICIsIiJdfV0sInRhcmdldCI6WzEsMV19fQ%2Cp_Ii9wcmFjdGljZS90cmltLXByb3Blci11cHBlci90cmltLWV4dHJhLXNwYWNlcyI%2Cs_Do5tDwuCoPJ4Yekv.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Remove extra spaces with TRIM | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_Remove%2Bextra%2Bspaces%2Bwith%2BTRIM%2Cdescription_~UHJhY3RpY2UgVFJJTSBpbiBhIGxpdmUgc3ByZWFkc2hlZXQ6IHJlbW92ZSB0aGUgZXh0cmEgc3BhY2VzIGZyb20gYW4gaW1wb3J0ZWQgbmFtZS4%2Ceyebrow_~VFJJTSwgUFJPUEVSIGFuZCBVUFBFUg%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiXSwicm93cyI6W3sibiI6MSwiY2VsbHMiOlsiTmFtZSBhcyBpbXBvcnRlZCIsIkNsZWFuIG5hbWUiXX0seyJuIjoyLCJjZWxscyI6WyIgIEFubmEgICBCZXJnICIsIiJdfV0sInRhcmdldCI6WzEsMV19fQ%2Cp_Ii9wcmFjdGljZS90cmltLXByb3Blci11cHBlci90cmltLWV4dHJhLXNwYWNlcyI%2Cs_Do5tDwuCoPJ4Yekv.png"
---

> Index of every page on this site: [llms.txt](https://practiceexcelonline.com/llms.txt)

# **Remove extra spaces with TRIM**

1.
2.
3.

Step 1 of 3

Text pasted from other systems often comes with **extra spaces**: before, after or between words. The name in A2 looks almost right, but a lookup for "Anna Berg" will not find it.

Click **Continue** when you're ready.

Already know it? Type the formula straight into B2.

B2fx

|  | A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- | --- |
| 1 | Name as imported | Clean name |  |  |  | |
| 2 | Anna Berg |  |  |  |  | |
| 3 |  |  |  |  |  | |
| 4 |  |  |  |  |  | |
| 5 |  |  |  |  |  | |
| 6 |  |  |  |  |  | |
| 7 |  |  |  |  |  | |
| 8 |  |  |  |  |  | |

Need help?

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://practiceexcelonline.com/#identity","@type":"Organization","name":"PracticeExcel","url":"https://practiceexcelonline.com/","logo":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/#website","@type":"WebSite","inLanguage":"en-US","name":"PracticeExcel","url":"https://practiceexcelonline.com/","alternateName":["Practice Excel Online","PracticeExcelOnline.com"],"publisher":{"@id":"https://practiceexcelonline.com/#identity"},"workTranslation":{"@id":"https://excelopgaver.dk/#website"}},{"@id":"https://practiceexcelonline.com/practice/trim-proper-upper/trim-extra-spaces#webpage","description":"Practice TRIM in a live spreadsheet: remove the extra spaces from an imported name.","name":"Remove extra spaces with TRIM","url":"https://practiceexcelonline.com/practice/trim-proper-upper/trim-extra-spaces","@type":["WebPage","FAQPage"],"breadcrumb":{"@id":"https://practiceexcelonline.com/practice/trim-proper-upper/trim-extra-spaces#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"mainEntity":[{"@id":"https://practiceexcelonline.com/practice/trim-proper-upper/trim-extra-spaces#/schema/question/1"},{"@id":"https://practiceexcelonline.com/practice/trim-proper-upper/trim-extra-spaces#/schema/question/2"}],"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/practice/trim-proper-upper/trim-extra-spaces"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/practice/trim-proper-upper/trim-extra-spaces#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Excel practice exercises","item":"https://practiceexcelonline.com/practice","position":2},{"@type":"ListItem","name":"TRIM, PROPER and UPPER","item":"https://practiceexcelonline.com/practice/trim-proper-upper","position":3},{"@type":"ListItem","name":"Remove extra spaces with TRIM","position":4}]},{"@id":"https://practiceexcelonline.com/practice/trim-proper-upper/trim-extra-spaces#/schema/question/1","@type":"Question","inLanguage":"en-US","name":"What does TRIM do in Excel?","acceptedAnswer":{"@type":"Answer","text":"TRIM removes spaces at the start and end of a text and replaces runs of spaces between words with one space, for example =TRIM(A2)."}},{"@id":"https://practiceexcelonline.com/practice/trim-proper-upper/trim-extra-spaces#/schema/question/2","@type":"Question","inLanguage":"en-US","name":"Why does my VLOOKUP fail on names that look the same?","acceptedAnswer":{"@type":"Answer","text":"One of them often has an extra space at the end. Clean the column with TRIM first."}},{"@id":"https://practiceexcelonline.com/practice/trim-proper-upper/trim-extra-spaces#/schema/learning-resource/1","@type":"LearningResource","description":"Practice TRIM in a live spreadsheet: remove the extra spaces from an imported name.","educationalLevel":"beginner","isAccessibleForFree":true,"learningResourceType":"exercise","name":"Remove extra spaces with TRIM","teaches":"TRIM, PROPER and UPPER"},{"@id":"https://practiceexcelonline.com/#logo","@type":"ImageObject","caption":"PracticeExcel","contentUrl":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png"}]}
```

## Sitemap

See the full [sitemap](https://practiceexcelonline.com/sitemap.md) for all pages.
