Skip to main content

Lesson 3.5 – Text Functions (LEFT, RIGHT, MID, LEN, CONCAT)

Lesson 3.5 – Text Functions (LEFT, RIGHT, MID, LEN, CONCAT)

Text functions help you extract, combine, and analyze text values in Excel. They are essential for cleaning data, preparing reports, and working with names, codes, product IDs, and imported datasets. In questa lezione impari cinque funzioni fondamentali: LEFT, RIGHT, MID, LEN e CONCAT.


1. LEFT – Extract Characters from the Left

Syntax:

=LEFT(text, number_of_characters)

Example:

=LEFT("ProductA", 7)

Result: Product

LEFT is useful for extracting prefixes, codes, or the first part of a string.


2. RIGHT – Extract Characters from the Right

Syntax:

=RIGHT(text, number_of_characters)

Example:

=RIGHT("AB12345", 5)

Result: 12345

RIGHT is ideal for extracting numeric codes, suffixes, or final characters.


3. MID – Extract Characters from the Middle

Syntax:

=MID(text, start_position, number_of_characters)

Example:

=MID("AB-2024-IT", 4, 4)

Result: 2024

MID is perfect for extracting values inside structured codes or formatted text.


4. LEN – Count Characters

Syntax:

=LEN(text)

Example:

=LEN("Excel")

Result: 5

LEN helps you check text length, validate codes, or find inconsistencies.


5. CONCAT – Combine Text

Syntax:

=CONCAT(text1, text2, ...)

Example:

=CONCAT(A2, " ", B2)

Result: John Smith

CONCAT joins text from multiple cells. It replaces the older CONCATENATE function.


6. Practical Example

Suppose you have a list of full names in column A. You can:

  • Extract the first 3 letters → =LEFT(A2, 3)
  • Extract the last 4 letters → =RIGHT(A2, 4)
  • Extract the middle part → =MID(A2, 2, 3)
  • Count characters → =LEN(A2)
  • Combine name + code → =CONCAT(A2, "-", B2)

7. Common Mistakes to Avoid

  • Using text functions on numbers without converting them
  • Forgetting that LEN counts spaces
  • Using CONCAT instead of TEXTJOIN when separators are needed
  • Extracting too many or too few characters

8. Practical Exercise

Practice text functions with the following steps:

  1. Create a worksheet named Lesson_3_5_Practice.
  2. Enter 10 text values (names, codes, product IDs).
  3. Use LEFT to extract the first 3 characters.
  4. Use RIGHT to extract the last 2 characters.
  5. Use MID to extract the central part.
  6. Use LEN to count characters.
  7. Use CONCAT to combine two columns.

Internal Links

Continua a imparare con le lezioni precedenti e successive:


Next Lesson

Lesson 3.6 – Logical Functions (IF, AND, OR)

Comments

Popular posts from this blog

Alfred Marshall – The Father of Modern Microeconomics

  Welcome back to the blog! Today we explore the life and legacy of Alfred Marshall (1842–1924) , the British economist who laid the foundations of modern microeconomics . His landmark book, Principles of Economics (1890), introduced core concepts like supply and demand , elasticity , and market equilibrium — ideas that continue to shape how we understand economics today. Who Was Alfred Marshall? Alfred Marshall was a professor at the University of Cambridge and a key figure in the development of neoclassical economics . He believed economics should be rigorous, mathematical, and practical , focusing on real-world issues like prices, wages, and consumer behavior. Marshall also emphasized that economics is ultimately about improving human well-being. Key Contributions 1. Supply and Demand Analysis Marshall was the first to clearly present supply and demand as intersecting curves on a graph. He showed how prices are determined by both what consumers are willing to pay (dem...

Unlocking South America's Data Potential: Trends, Challenges, and Strategic Opportunities for 2025

  Introduction South America is entering a pivotal phase in its digital and economic transformation. With countries like Brazil, Mexico, and Argentina investing heavily in data infrastructure, analytics, and digital governance, the region presents both challenges and opportunities for professionals working in Business Intelligence (BI), Data Analysis, and IT Project Management. This post explores the key data trends shaping South America in 2025, backed by insights from the World Bank, OECD, and Statista. It’s designed for analysts, project managers, and decision-makers who want to understand the region’s evolving landscape and how to position themselves for impact. 1. Economic Outlook: A Region in Transition According to the World Bank’s Global Economic Prospects 2025 , Latin America is expected to experience slower growth compared to global averages, with GDP expansion constrained by trade tensions and policy uncertainty. Brazil and Mexico remain the largest economies, with proj...

Kickstart Your SQL Journey with Our Step-by-Step Tutorial Series

  Welcome to Data Analyst BI! If you’ve ever felt overwhelmed by rows, columns, and cryptic error messages when trying to write your first SQL query, you’re in the right place. Today we’re launching a comprehensive SQL tutorial series crafted specifically for beginners. Whether you’re just starting your data career, pivoting from another field, or simply curious about how analysts slice and dice data, these lessons will guide you from day zero to confident query builder. In each installment, you’ll find clear explanations, annotated examples, and hands-on exercises. By the end of this series, you’ll be able to: Write efficient SQL queries to retrieve and transform data Combine multiple tables to uncover relationships Insert, update, and delete records safely Design robust database schemas with keys and indexes Optimize performance for large datasets Ready to master SQL in a structured, step-by-step way? Let’s explore the full roadmap ahead. Wh...