Mastering Excel Text Functions: The Ultimate Guide

Enhance Your Excel Skills with 32 Text Manipulation, Error Handling, Date & Time Functions, and More!

Leonardo Anello
Nerd For Tech
5 min readMar 21, 2023

--

Introduction

Microsoft Excel is a powerful tool that can be used for a wide range of purposes, including data analysis, financial modeling, and calculations.

One of its most powerful features is the ability to manipulate text data. This article will teach you how to master text functions in Excel, including basic and advanced text functions, error handling, date and time functions, and other useful tips and tricks.

Mastering Text Functions: Tips and Tricks

Text functions in Excel are designed to manipulate and work with text data in cells. They can be used for various purposes, such as combining text from multiple cells, extracting specific characters, or changing the case of text.

To become a master of text functions in Excel, practice using different functions in combination to achieve complex tasks. Here’s a resume with text functions in Microsoft Excel, along with examples and explanations:

  1. CONCATENATE: This function combines two or more strings of text into one string. For example, if you have cells A1 and B1 with the values “Hello” and “World”, respectively
=CONCATENATE(A1,” “,B1) would return “Hello World”.

2. LEFT: This function returns a specified number of characters from the beginning of a string.

=LEFT(“Hello World”, 5) would return “Hello”.

3. RIGHT: This function returns a specified number of characters from the end of a string.

=RIGHT(“Hello World”, 5) would return “World”.

4. MID: This function returns a specified number of characters from the middle of a string.

 =MID(“Hello World”, 7, 5) would return “World”.

5. LEN: This function returns the number of characters in a string:

=LEN(“Hello World”) would return 11.

6. FIND: This function returns the starting position of a specified text string within another text string.

=FIND(“World”, “Hello World”) would return 7.

7. SEARCH: This function returns the starting position of a specified text string within another text string, ignoring uppercase and lowercase differences.

SEARCH(“world”, “Hello World”) would return 7.

8. SUBSTITUTE: This function replaces one or all occurrences of a specified character or text string within a text string with another character or text string.

=SUBSTITUTE(“Hello World”, “o”, “a”) would return “Hella Warld”.

9. REPLACE: This function replaces a specified number of characters in a string with another string.

=REPLACE(“Hello World”, 6, 5, “Coders”) would return “Hello Coders”.

10. TRIM: This function removes extra spaces from a string.

=TRIM(“ Hello World “) would return “Hello World”.

11. CLEAN: This function removes all non-printable characters from a string.

= CLEAN(“Hello” & CHAR(7) & “World”) would return “HelloWorld”.

12. LOWER: This function converts all text in a string to lowercase.

=LOWER(“Hello World”) would return “hello world”.

13. UPPER: This function converts all text in a string to uppercase.

=UPPER(“Hello World”) would return “HELLO WORLD”.

14. PROPER: This function capitalizes the first letter of each word in a string.

=PROPER(“hello world”) would return “Hello World”.

15. TEXT: This function formats a value as text using a specified format code.

=TEXT(TODAY(), “dd-mmm-yyyy”) 
would return the current date in the format “21-Mar-2023”.

16. VALUE: This function converts a text string that represents a number to a numerical value.

=VALUE(“123”) 
would return the value 123.

17. EXACT: This function compares two text strings to see if they are exactly the same.

=EXACT(“Hello World”, “Hello World”) 
would return TRUE.

18. LEFTB: This function returns a specified number of bytes from the beginning of a string. This function is used for double-byte character set (DBCS) languages.

=LEFTB(“こんにちは”, 4) would return “こん”.

19. RIGHTB: This function returns a specified number of bytes from the end of a string. This function is used for double-byte character set (DBCS) languages.

=RIGHTB(“こんにちは”, 4) would return “にちは”.

20. MIDB: This function returns a specified number of bytes from the middle of a string. This function is used for double-byte character set (DBCS) languages:

MIDB(“こんにちは”, 3, 4) would return “ちは”.

21. LENB: This function returns the number of bytes in a string. This function is used for double-byte character set (DBCS) languages.

=LENB(“こんにちは”) would return 10.

22. CONCAT: This function combines two or more strings of text into one string. This function was introduced in Excel 2016 and replaces the CONCATENATE function.

=CONCAT(“Hello”, “ “, “World”) would return “Hello World”.

23. CONCATENATEX: This function combines values from a column into a string using a delimiter. This function was introduced in Excel 2016. For example, if you have a column of names in A1:A4, the formula:

=CONCATENATEX(“, “, A1:A4) would return “John, Jane, Mike, Sarah”.

24. TEXTJOIN: This function combines values from a range or array into a string using a delimiter. This function was introduced in Excel 2016. For example, if you have a range of names in A1:A4, the formula:

=TEXTJOIN(“, “, TRUE, A1:A4) would return “John, Jane, Mike, Sarah”.

25. REPT: This function repeats a text string a specified number of times:

=REPT(“abc”, 3) would return “abcabcabc”.

26. T: This function returns the text representation of a value.

=T(123) would return “123”.

27. N: This function converts a text string to a number.

=N(“123”) would return the value 123.

28. CHAR: This function returns the character specified by a number.

=CHAR(65) would return “A”.

29. CODE: This function returns the numeric code of the first character in a text string.

=CODE(“A”) would return 65.

31. UNICHAR: This function returns the Unicode character specified by a number.

=UNICHAR(65) would return “A”.

32. UNICODE: This function returns the Unicode code point of the first character in a text string.


=UNICODE(“A”) would return 65.

Conclusion

Mastering text functions in Excel is essential to effectively work with text data in your spreadsheets. By understanding and utilizing basic and advanced text functions, error handling, date and time functions, and other useful tips and tricks, you can improve your overall Excel skills and increase productivity.

FAQs

Can I use text functions with numbers in Excel?

Yes, you can use text functions with numbers. Excel will automatically convert numbers to text when required by a text function.

How can I join text and numbers together in Excel?

You can use the CONCAT function or the “&” operator to join text and numbers together.

How do I remove specific characters from a text string in Excel?

You can use the SUBSTITUTE function to replace specific characters or substrings with an empty string (“”).

Can I use text functions to format dates and times?

Yes, you can use the TEXT function to format date and time values as text strings with custom formats.

What’s the difference between Flash Fill and Text-to-Columns?

Flash Fill is an automated feature that fills in values based on a pattern identified in the data, while Text-to-Columns is a manual process that splits text data in a single column into multiple columns based on a specified delimiter. Flash Fill can be faster and more convenient for simple tasks, whereas Text-to-Columns offers more control over the splitting process.

Thank you for reading it.

🐼❤️.

--

--

Leonardo Anello
Nerd For Tech

Data Scientist. 🐼 @panData is my personal repository showcasing the Data Projects I've applied, studied, and self-taught skills. www.linkedin.com/in/anello92