Three text extraction functions — LEFT pulls from the start, RIGHT from the end, MID from anywhere in between.
=LEFT(text, num_chars)
=LEFT(A2, 3) first 3 characters of A2
=LEFT("ExcelPro", 5) returns "Excel"Use LEFT when you need a fixed number of characters from the beginning — country codes, ID prefixes, department codes.
=RIGHT(text, num_chars)
=RIGHT(A2, 4) last 4 characters of A2
=RIGHT("report_2026.xlsx", 4) returns "xlsx"Use RIGHT when you need a fixed number of characters from the end — file extensions, year digits, area codes.
=MID(text, start_num, num_chars)
=MID(A2, 4, 3) 3 characters starting from position 4
=MID("ExcelPro123", 9, 3) returns "123"Use MID when you need characters from a specific position. The start_num is 1-indexed (1 = first character).
=LEFT(A2, FIND(" ", A2) - 1)
-- Extract first name: everything before the first space
=MID(A2, FIND(" ", A2) + 1, LEN(A2))
-- Extract last name: everything after the first spaceIn Excel 365, TEXTBEFORE and TEXTAFTER replace most LEFT/MID/RIGHT + FIND combinations with cleaner syntax. Use the new functions when available.
ExcelPro has 880+ hands-on exercises across 9 tracks — type real formulas, get instant feedback.
Start practising free →