Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Returning the Left-most Characters.

Returning the Left-most Characters

Written by Allen Wyatt (last updated October 11, 2022)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


1

Sometimes you may need to create a worksheet formula that examines the left-most characters in a different cell. To allow for this need, Excel provides the LEFT worksheet function. You use it by specifying the cell or value to use, along with the number of characters to return. For instance, the following formula returns the three left-most characters in cell A7:

=LEFT(A7,3)

If the value in A7 is not text, then LEFT still treats it as if it is. Thus, if A7 contains 12345, then the above formula returns the text value 123.

If you want to return just the single left-most character, you could use either of the following:

=LEFT(A7,1)
=LEFT(A7)

The second variation works because the LEFT function defaults to 1 for the second parameter.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (8806) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Returning the Left-most Characters.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Arranging Document Windows

When you have multiple documents open at the same time, you need a way to control how those document windows appear on ...

Discover More

Swapping Two Strings

Strings are used quite frequently in macros. You may want to swap the contents of two string variables, and you can do so ...

Discover More

Checking Just the Selected Text

Having a hard time doing a spell check on just the portion of the document you've selected? This is apparently due to a ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Finding the Nth Root of a Number

Finding a square root is easy because Excel provides a worksheet function for that purpose. Finding a different root may ...

Discover More

EOMONTH Function is Flakey

Some users have reported problems using the EOMONTH function in later versions of Excel, beginning with Excel 2007. The ...

Discover More

Using the ABS Function

Need to find the absolute value of a number? That's where the ABS function comes into play.

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 8?

2022-10-19 05:47:02

Thomas Papavasiliou

To get the expected result, in the case where the first character is a space, use the formula =LEFT(TRIM(K2))


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.