---
title: "LEFT, RIGHT and MID practice: 4 exercises with answers"
description: "Practice LEFT, RIGHT and MID in a live spreadsheet by pulling parts out of product and invoice codes."
canonical_url: "https://excelsavvy.com/practice/left-right-mid"
meta:
  "og:description": "Practice LEFT, RIGHT and MID in a live spreadsheet by pulling parts out of product and invoice codes."
  "og:image": "https://excelsavvy.com/_og/d/c_Page%2Ctitle_~TEVGVCwgUklHSFQgYW5kIE1JRCBwcmFjdGljZTogNCBleGVyY2lzZXMgd2l0aCBhbnN3ZXJz%2Cdescription_~UHJhY3RpY2UgTEVGVCwgUklHSFQgYW5kIE1JRCBpbiBhIGxpdmUgc3ByZWFkc2hlZXQgYnkgcHVsbGluZyBwYXJ0cyBvdXQgb2YgcHJvZHVjdCBhbmQgaW52b2ljZSBjb2Rlcy4%2Ceyebrow_Excel%2Bpractice%2Bexercises%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiXSwicm93cyI6W3sibiI6MSwiY2VsbHMiOlsiUHJvZHVjdCBjb2RlIiwiV2FyZWhvdXNlIl19LHsibiI6MiwiY2VsbHMiOlsiT1NMLTEwNDIyIiwiIl19XSwidGFyZ2V0IjpbMSwxXX19%2Cp_Ii9wcmFjdGljZS9sZWZ0LXJpZ2h0LW1pZCI%2Cs_SHu8tBJ3FrrmhmVL.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "LEFT, RIGHT and MID practice: 4 exercises with answers"
  "twitter:image": "https://excelsavvy.com/_og/d/c_Page%2Ctitle_~TEVGVCwgUklHSFQgYW5kIE1JRCBwcmFjdGljZTogNCBleGVyY2lzZXMgd2l0aCBhbnN3ZXJz%2Cdescription_~UHJhY3RpY2UgTEVGVCwgUklHSFQgYW5kIE1JRCBpbiBhIGxpdmUgc3ByZWFkc2hlZXQgYnkgcHVsbGluZyBwYXJ0cyBvdXQgb2YgcHJvZHVjdCBhbmQgaW52b2ljZSBjb2Rlcy4%2Ceyebrow_Excel%2Bpractice%2Bexercises%2Csite_practiceexcel%2Cprops_eyJncmlkIjp7ImNvbHMiOlsiQSIsIkIiXSwicm93cyI6W3sibiI6MSwiY2VsbHMiOlsiUHJvZHVjdCBjb2RlIiwiV2FyZWhvdXNlIl19LHsibiI6MiwiY2VsbHMiOlsiT1NMLTEwNDIyIiwiIl19XSwidGFyZ2V0IjpbMSwxXX19%2Cp_Ii9wcmFjdGljZS9sZWZ0LXJpZ2h0LW1pZCI%2Cs_SHu8tBJ3FrrmhmVL.png"
---

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

# **LEFT, RIGHT and MID practice exercises**

Take a piece out of a text by position: the first characters, the last characters or a run from the middle, such as a prefix or a year inside a code.

[**Start the first exercise**](https://excelsavvy.com/practice/left-right-mid/left-first-characters)

LEN(RIGHT(

## **How LEFT, RIGHT and MID work**

LEFT, RIGHT and MID cut a piece out of a text by position. LEFT takes characters from the start and RIGHT takes them from the end. Both need the text and how many characters to take. MID takes a run from the middle, so it needs one more argument: the position to start at. In all three, a space counts as a character.

If A2 holds the product code "OSL-2024-0173", `**=LEFT(A2,3)**` returns "OSL", `**=MID(A2,5,4)**` returns "2024" and `**=RIGHT(A2,4)**` returns "0173". The result is always text, even when it looks like a number. If you need to calculate with it, wrap the formula in VALUE or multiply it by 1.

Counting positions breaks down when the pieces have different lengths. To drop a 3-character prefix from any length of text, combine RIGHT with LEN: `**=RIGHT(A2,LEN(A2)-3)**`. If the text has a separator like a dash or an @, use FIND to locate it instead of counting. The exercises below cover taking a prefix with LEFT, the last digits with RIGHT, a year from the middle with MID, and dropping a prefix with RIGHT and LEN.

1. [**1****Take the prefix with LEFT**The first three letters of the product code in A2 name the warehouse. In B2, use LEFT to get them.](https://excelsavvy.com/practice/left-right-mid/left-first-characters)
2. [**2****Take the last digits with RIGHT****Premium**In B2, use RIGHT to get the last four characters of the invoice in A2, the running number.](https://excelsavvy.com/practice/left-right-mid/right-last-characters)
3. [**3****Take the year from the middle with MID****Premium**The year in the invoice in A2 starts at character 5 and is 4 characters long. In B2, use MID to get it.](https://excelsavvy.com/practice/left-right-mid/mid-text-from-middle)
4. [**4****Drop a prefix with RIGHT and LEN****Premium**Every order ID starts with a 3-letter channel code, but the numbers have different lengths. In B2, take everything after the first 3 characters with RIGHT, and use LEN(A2)-3 for how many.](https://excelsavvy.com/practice/left-right-mid/right-len-remove-prefix)

## **Functions in this topic**

- [**LEN**](https://excelsavvy.com/functions/len)
- [**RIGHT**](https://excelsavvy.com/functions/right)

## **Read the guide**

- [**How to clean data in Excel with formulas**](https://excelsavvy.com/learn/clean-data-in-excel)
- [**Excel customer data: free practice file with tasks and answers**](https://excelsavvy.com/learn/excel-customer-data)
- [**Excel data cleaning practice: a messy file with tasks and answers**](https://excelsavvy.com/learn/excel-data-cleaning-practice)

## **Questions**

<details>

<summary>

### How do I get the text between two characters in Excel?

</summary>

Use MID with FIND to locate both characters. If A2 holds "Sales (North)", =MID(A2,FIND("(",A2)+1,FIND(")",A2)-FIND("(",A2)-1) returns North. FIND gives the positions and MID cuts out what sits between them. In Excel 365 it is shorter: =TEXTBEFORE(TEXTAFTER(A2,"("),")").

</details>

<details>

<summary>

### How do I remove the first or last characters from a text in Excel?

</summary>

To drop the first 3 characters, use =RIGHT(A2,LEN(A2)-3). To drop the last 3, use =LEFT(A2,LEN(A2)-3). LEN gives the total length, and you subtract what you want to remove. If a cell has fewer than 3 characters, the formula returns a #VALUE! error.

</details>

<details>

<summary>

### Why does LEFT, RIGHT or MID return text instead of a number?

</summary>

These functions always return text, even when the characters are digits. A result like "2024" is then left-aligned, skipped by SUM and sorted as text. Convert it with VALUE, as in =VALUE(MID(A2,5,4)), or multiply by 1. A double minus works too: =--MID(A2,5,4).

</details>

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://excelsavvy.com/#identity","@type":"Organization","name":"ExcelSavvy","url":"https://excelsavvy.com/","logo":{"@id":"https://excelsavvy.com/#logo"}},{"@id":"https://excelsavvy.com/#website","@type":"WebSite","inLanguage":"en-US","name":"ExcelSavvy","url":"https://excelsavvy.com/","alternateName":["Excel Savvy","ExcelSavvy.com","PracticeExcel","Practice Excel Online"],"publisher":{"@id":"https://excelsavvy.com/#identity"},"workTranslation":[{"@id":"https://excelopgaver.dk/#website"},{"@id":"https://excelpraxis.de/#website"}]},{"@id":"https://excelsavvy.com/practice/left-right-mid#webpage","description":"Practice LEFT, RIGHT and MID in a live spreadsheet by pulling parts out of product and invoice codes.","name":"LEFT, RIGHT and MID practice: 4 exercises with answers","url":"https://excelsavvy.com/practice/left-right-mid","@type":["WebPage","CollectionPage","FAQPage"],"breadcrumb":{"@id":"https://excelsavvy.com/practice/left-right-mid#breadcrumb"},"isPartOf":{"@id":"https://excelsavvy.com/#website"},"mainEntity":[{"@id":"https://excelsavvy.com/practice/left-right-mid#/schema/question/1"},{"@id":"https://excelsavvy.com/practice/left-right-mid#/schema/question/2"},{"@id":"https://excelsavvy.com/practice/left-right-mid#/schema/question/3"}],"potentialAction":[{"@type":"ReadAction","target":["https://excelsavvy.com/practice/left-right-mid"]}],"primaryImageOfPage":{"@id":"https://excelsavvy.com/#logo"}},{"@id":"https://excelsavvy.com/practice/left-right-mid#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://excelsavvy.com","position":1},{"@type":"ListItem","name":"Excel practice exercises","item":"https://excelsavvy.com/practice","position":2},{"@type":"ListItem","name":"LEFT, RIGHT and MID practice: 4 exercises with answers","position":3}]},{"@id":"https://excelsavvy.com/practice/left-right-mid#/schema/question/1","@type":"Question","inLanguage":"en-US","name":"How do I get the text between two characters in Excel?","acceptedAnswer":{"@type":"Answer","text":"Use MID with FIND to locate both characters. If A2 holds \"Sales (North)\", =MID(A2,FIND(\"(\",A2)+1,FIND(\")\",A2)-FIND(\"(\",A2)-1) returns North. FIND gives the positions and MID cuts out what sits between them. In Excel 365 it is shorter: =TEXTBEFORE(TEXTAFTER(A2,\"(\"),\")\")."}},{"@id":"https://excelsavvy.com/practice/left-right-mid#/schema/question/2","@type":"Question","inLanguage":"en-US","name":"How do I remove the first or last characters from a text in Excel?","acceptedAnswer":{"@type":"Answer","text":"To drop the first 3 characters, use =RIGHT(A2,LEN(A2)-3). To drop the last 3, use =LEFT(A2,LEN(A2)-3). LEN gives the total length, and you subtract what you want to remove. If a cell has fewer than 3 characters, the formula returns a #VALUE! error."}},{"@id":"https://excelsavvy.com/practice/left-right-mid#/schema/question/3","@type":"Question","inLanguage":"en-US","name":"Why does LEFT, RIGHT or MID return text instead of a number?","acceptedAnswer":{"@type":"Answer","text":"These functions always return text, even when the characters are digits. A result like \"2024\" is then left-aligned, skipped by SUM and sorted as text. Convert it with VALUE, as in =VALUE(MID(A2,5,4)), or multiply by 1. A double minus works too: =--MID(A2,5,4)."}},{"@id":"https://excelsavvy.com/#logo","@type":"ImageObject","caption":"ExcelSavvy","contentUrl":"https://excelsavvy.com/brand/practiceexcel/icon-512.png?v=3","inLanguage":"en-US","url":"https://excelsavvy.com/brand/practiceexcel/icon-512.png?v=3"}]}
```

## Sitemap

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