TGViewer
MS Excel for Data Analysis MS Excel for Data Analysis @excel_analyst ยท 73.1K subscribers
Post #2251 3.06K
๐Ÿ“Š Excel Basics #25 โ€“ Text Functions: LEFT(), RIGHT() & MID()

Text functions are extremely useful when working with names, IDs, codes, email addresses, and other text-based data.

Three important functions to learn are:

๐Ÿ‘‰ LEFT()

๐Ÿ‘‰ RIGHT()

๐Ÿ‘‰ MID()

๐Ÿ“Œ 1. LEFT() Function

LEFT() extracts a specified number of characters from the beginning (left side) of a text string.

Syntax:

=LEFT(text, [num_chars])

Example:

=LEFT("EXCEL2026",5)

Result: EXCEL

Another example:

If A2 = "EMP-10245"

=LEFT(A2,3)

Result: EMP

๐Ÿ“Œ 2. RIGHT() Function

RIGHT() extracts a specified number of characters from the end (right side) of a text string.

Syntax:

=RIGHT(text, [num_chars])

Example:

=RIGHT("EXCEL2026",4)

Result: 2026

If: A2 = "EMP-10245"

=RIGHT(A2,5)

Result: 10245

๐Ÿ“Œ 3. MID() Function

MID() extracts characters from the middle of a text string, starting at a specified position.

Syntax:

=MID(text, start_num, num_chars)

Example:

=MID("EMP-10245",5,5)

Result: 10245

Here:

โ€ข 5 โ†’ Starting position

โ€ข 5 โ†’ Number of characters to extract

๐Ÿ“Œ Real-World Example

Suppose you have Employee IDs:

Employee ID

EMP-10245

EMP-10321

EMP-10456

Extract the prefix:

=LEFT(A2,3)

Result: EMP

Extract the employee number:

=RIGHT(A2,5)

Result: 10245

๐Ÿ“Œ Another Example โ€“ Product Codes

Suppose: A2 = "IND-LAP-2026"

Country code:

=LEFT(A2,3)

Result: IND

Product code:

=MID(A2,5,3)

Result: LAP

Year:

=RIGHT(A2,4)

Result: 2026

๐Ÿ“Œ Common Mistakes

โŒ Using the wrong character position in MID()

โŒ Forgetting that spaces count as characters

โŒ Extracting a fixed number of characters when the text length varies

๐Ÿ“Œ Real-World Uses

โ€ข Extract employee IDs

โ€ข Separate product codes

โ€ข Extract country or department codes

โ€ข Clean customer data

โ€ข Process invoice numbers

โ€ข Prepare data for analysis

โœ… Quick Tip

LEFT() โ†’ Extract from the left โฌ…๏ธ

RIGHT() โ†’ Extract from the right โžก๏ธ

MID() โ†’ Extract from the middle ๐ŸŽฏ

These functions are especially useful when cleaning and transforming raw data before analysis.

Double Tap โค๏ธ For More
  • โค 9
More from @excel_analyst
  1. Oct 8, 2026๐ŸŽ“ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐˜€! ๐Ÿš€๐Ÿ”ฅ Upgrโ€ฆ
  2. Oct 7, 2026๐Ÿ“Š Excel Shortcuts โ€” Part 5 This part focuses on Tables, Filters & Data Analysis shortcutsโ€ฆ
  3. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  4. Oct 7, 2026๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ ๐—•๐—œ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐Ÿ”ฅ Learn Power BI through these FREE learninโ€ฆ
  5. Sep 29, 2026๐Ÿ“Š Excel Shortcuts โ€” Part 3 This part focuses on Formatting Shortcuts โ€” quickly format celโ€ฆ
  6. Sep 29, 2026๐—™๐—ฅ๐—˜๐—˜ ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€ ๐—ง๐—ผ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐—”๐—œ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ๐Ÿš€ โ€‹ Explore 6 free resourceโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’