---
title: "Clean a code with UPPER and TRIM | PracticeExcel"
description: "Practice UPPER and TRIM together in a live spreadsheet: clean up a code typed with spaces and small letters."
canonical_url: "https://practiceexcelonline.com/practice/trim-proper-upper/upper-trim-clean-codes"
locale: en
meta:
  "og:description": "Practice UPPER and TRIM together in a live spreadsheet: clean up a code typed with spaces and small letters."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_Clean%2Ba%2Bcode%2Bwith%2BUPPER%2Band%2BTRIM%2Cdescription_~UHJhY3RpY2UgVVBQRVIgYW5kIFRSSU0gdG9nZXRoZXIgaW4gYSBsaXZlIHNwcmVhZHNoZWV0OiBjbGVhbiB1cCBhIGNvZGUgdHlwZWQgd2l0aCBzcGFjZXMgYW5kIHNtYWxsIGxldHRlcnMu%2Ceyebrow_~VFJJTSwgUFJPUEVSIGFuZCBVUFBFUg%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiXSwicm93cyI6W3sibiI6MSwiY2VsbHMiOlsiQ29kZSBhcyB0eXBlZCIsIkNvZGUiXX0seyJuIjoyLCJjZWxscyI6WyIgZGstNDAyMSAgIiwiIl19XSwidGFyZ2V0IjpbMSwxXX19%2Cp_Ii9wcmFjdGljZS90cmltLXByb3Blci11cHBlci91cHBlci10cmltLWNsZWFuLWNvZGVzIg%2Cs_VgXKIXD0sbvl7HnR.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Clean a code with UPPER and TRIM | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_Clean%2Ba%2Bcode%2Bwith%2BUPPER%2Band%2BTRIM%2Cdescription_~UHJhY3RpY2UgVVBQRVIgYW5kIFRSSU0gdG9nZXRoZXIgaW4gYSBsaXZlIHNwcmVhZHNoZWV0OiBjbGVhbiB1cCBhIGNvZGUgdHlwZWQgd2l0aCBzcGFjZXMgYW5kIHNtYWxsIGxldHRlcnMu%2Ceyebrow_~VFJJTSwgUFJPUEVSIGFuZCBVUFBFUg%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiXSwicm93cyI6W3sibiI6MSwiY2VsbHMiOlsiQ29kZSBhcyB0eXBlZCIsIkNvZGUiXX0seyJuIjoyLCJjZWxscyI6WyIgZGstNDAyMSAgIiwiIl19XSwidGFyZ2V0IjpbMSwxXX19%2Cp_Ii9wcmFjdGljZS90cmltLXByb3Blci11cHBlci91cHBlci10cmltLWNsZWFuLWNvZGVzIg%2Cs_VgXKIXD0sbvl7HnR.png"
---

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

# **Clean a code with UPPER and TRIM**

**Premium**

In B2, clean up the code in A2 so it has no extra spaces and is all capitals. Put TRIM inside UPPER.

B2fx

|  | A | B | C | D | E | F |
| --- | --- | --- | --- | --- | --- | --- |
| 1 | Code as typed | Code |  |  |  | |
| 2 | dk-4021 |  |  |  |  | |
| 3 |  |  |  |  |  | |
| 4 |  |  |  |  |  | |
| 5 |  |  |  |  |  | |
| 6 |  |  |  |  |  | |
| 7 |  |  |  |  |  | |
| 8 |  |  |  |  |  | |

**Premium lesson**

## **Unlock TRIM, PROPER and UPPER and every other lesson**

This is a premium lesson. Premium lets you solve it and every other lesson, take the timed mock tests, and earn certificates you can share on LinkedIn.

Next with premium:**LEFT, RIGHT and MID****FIND and SEARCH**

[**See plans, from $5/month**](https://practiceexcelonline.com/pricing) [**Already premium? Sign in**](https://practiceexcelonline.com/login?next=/practice/trim-proper-upper/upper-trim-clean-codes)

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/upper-trim-clean-codes#webpage","@type":"WebPage","description":"Practice UPPER and TRIM together in a live spreadsheet: clean up a code typed with spaces and small letters.","name":"Clean a code with UPPER and TRIM","url":"https://practiceexcelonline.com/practice/trim-proper-upper/upper-trim-clean-codes","breadcrumb":{"@id":"https://practiceexcelonline.com/practice/trim-proper-upper/upper-trim-clean-codes#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/practice/trim-proper-upper/upper-trim-clean-codes"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/practice/trim-proper-upper/upper-trim-clean-codes#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":"Clean a code with UPPER and TRIM","position":4}]},{"@id":"https://practiceexcelonline.com/practice/trim-proper-upper/upper-trim-clean-codes#/schema/learning-resource/1","@type":"LearningResource","description":"Practice UPPER and TRIM together in a live spreadsheet: clean up a code typed with spaces and small letters.","educationalLevel":"beginner","isAccessibleForFree":false,"learningResourceType":"exercise","name":"Clean a code with UPPER and 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.
