---
title: "LEFT function in Excel: syntax and examples | PracticeExcel"
description: "How to use LEFT in Excel and Google Sheets: take the first characters of a code, name or number."
canonical_url: "https://practiceexcelonline.com/functions/left"
locale: en
meta:
  "og:description": "How to use LEFT in Excel and Google Sheets: take the first characters of a code, name or number."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~TEVGVCBmdW5jdGlvbiBpbiBFeGNlbDogc3ludGF4IGFuZCBleGFtcGxlcw%2Cdescription_~SG93IHRvIHVzZSBMRUZUIGluIEV4Y2VsIGFuZCBHb29nbGUgU2hlZXRzOiB0YWtlIHRoZSBmaXJzdCBjaGFyYWN0ZXJzIG9mIGEgY29kZSwgbmFtZSBvciBudW1iZXIu%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~TEVGVCh0ZXh0LCBbbnVtX2NoYXJzXSk%2Cp_Ii9mdW5jdGlvbnMvbGVmdCI%2Cs_8fKGS9mA-GU2ijGr.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "LEFT function in Excel: syntax and examples | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~TEVGVCBmdW5jdGlvbiBpbiBFeGNlbDogc3ludGF4IGFuZCBleGFtcGxlcw%2Cdescription_~SG93IHRvIHVzZSBMRUZUIGluIEV4Y2VsIGFuZCBHb29nbGUgU2hlZXRzOiB0YWtlIHRoZSBmaXJzdCBjaGFyYWN0ZXJzIG9mIGEgY29kZSwgbmFtZSBvciBudW1iZXIu%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~TEVGVCh0ZXh0LCBbbnVtX2NoYXJzXSk%2Cp_Ii9mdW5jdGlvbnMvbGVmdCI%2Cs_8fKGS9mA-GU2ijGr.png"
---

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

# **The LEFT function**

Returns the first characters of a text. Without num\_chars it returns one character.

=

LEFT(

## **Syntax**

```
LEFT(text, [num_chars])
```

<dl><dt>**text **</dt>
<dd>The text to take characters from.</dd>
<dt>**num_chars **(optional)</dt>
<dd>How many characters to return. Default 1.</dd></dl>

## **Examples**

C1`=LEFT(<sup>1</sup>A2,<sup>2</sup>2)`

|  | A | B | C |
| --- | --- | --- | --- |
| 1 | Code |  | **DK** |
| 2 | DK-2100 |  | |

**In plain words:** Take <sup>2</sup>the first 2 characters of <sup>1</sup>the code in A2.

C1=LEFT(A2)

|  | A | B | C |
| --- | --- | --- | --- |
| 1 | Code |  | **D** |
| 2 | DK-2100 |  | |

## **Practice LEFT**

- [**1****Build an ID from a department and a number**→](https://practiceexcelonline.com/practice/join-text/build-id-left-upper)

## **Read the guide**

- [**How to clean data in Excel with formulas**](https://practiceexcelonline.com/learn/clean-data-in-excel)
- [**How to merge cells in Excel, and what to use instead**](https://practiceexcelonline.com/learn/merge-cells-excel)

## **Related functions**

- [**RIGHT**](https://practiceexcelonline.com/functions/right)
- [**MID**](https://practiceexcelonline.com/functions/mid)
- [**FIND**](https://practiceexcelonline.com/functions/find)

```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/functions/left#webpage","@type":"WebPage","description":"How to use LEFT in Excel and Google Sheets: take the first characters of a code, name or number.","name":"LEFT function in Excel: syntax and examples","url":"https://practiceexcelonline.com/functions/left","breadcrumb":{"@id":"https://practiceexcelonline.com/functions/left#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/functions/left"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/functions/left#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Excel functions","item":"https://practiceexcelonline.com/functions","position":2},{"@type":"ListItem","name":"LEFT function in Excel: syntax and examples","position":3}]},{"@id":"https://practiceexcelonline.com/functions/left#article","description":"How to use LEFT in Excel and Google Sheets: take the first characters of a code, name or number.","headline":"LEFT function in Excel: syntax and examples","inLanguage":"en-US","thumbnailUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~TEVGVCBmdW5jdGlvbiBpbiBFeGNlbDogc3ludGF4IGFuZCBleGFtcGxlcw%2Cdescription_~SG93IHRvIHVzZSBMRUZUIGluIEV4Y2VsIGFuZCBHb29nbGUgU2hlZXRzOiB0YWtlIHRoZSBmaXJzdCBjaGFyYWN0ZXJzIG9mIGEgY29kZSwgbmFtZSBvciBudW1iZXIu%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~TEVGVCh0ZXh0LCBbbnVtX2NoYXJzXSk%2Cp_Ii9mdW5jdGlvbnMvbGVmdCI%2Cs_8fKGS9mA-GU2ijGr.png","@type":["Article","TechArticle"],"author":{"@id":"https://practiceexcelonline.com/#identity"},"image":{"@id":"https://practiceexcelonline.com/#/schema/image/1"},"isPartOf":{"@id":"https://practiceexcelonline.com/functions/left#webpage"},"mainEntityOfPage":{"@id":"https://practiceexcelonline.com/functions/left#webpage"},"publisher":{"@id":"https://practiceexcelonline.com/#identity"}},{"@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"},{"@id":"https://practiceexcelonline.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~TEVGVCBmdW5jdGlvbiBpbiBFeGNlbDogc3ludGF4IGFuZCBleGFtcGxlcw%2Cdescription_~SG93IHRvIHVzZSBMRUZUIGluIEV4Y2VsIGFuZCBHb29nbGUgU2hlZXRzOiB0YWtlIHRoZSBmaXJzdCBjaGFyYWN0ZXJzIG9mIGEgY29kZSwgbmFtZSBvciBudW1iZXIu%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~TEVGVCh0ZXh0LCBbbnVtX2NoYXJzXSk%2Cp_Ii9mdW5jdGlvbnMvbGVmdCI%2Cs_8fKGS9mA-GU2ijGr.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~TEVGVCBmdW5jdGlvbiBpbiBFeGNlbDogc3ludGF4IGFuZCBleGFtcGxlcw%2Cdescription_~SG93IHRvIHVzZSBMRUZUIGluIEV4Y2VsIGFuZCBHb29nbGUgU2hlZXRzOiB0YWtlIHRoZSBmaXJzdCBjaGFyYWN0ZXJzIG9mIGEgY29kZSwgbmFtZSBvciBudW1iZXIu%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~TEVGVCh0ZXh0LCBbbnVtX2NoYXJzXSk%2Cp_Ii9mdW5jdGlvbnMvbGVmdCI%2Cs_8fKGS9mA-GU2ijGr.png"}]}
```

## Sitemap

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