While most of the in-built features and default settings are meant to be useful and save time for the users, sometimes, you may want to change things a little. Converting your numbers into text is one such scenario. In this tutorial, I will show you some easy ways to quickly convert numbers to text in Excel.
Why Convert Numbers to Text in Excel?
When working with numbers in Excel, it’s best to keep these as numbers only. But in some cases, having a number could actually be a problem. Lets look at a couple of scenarios where having numbers creates issues for the users.
Keeping Leading Zeros
For example, if you enter 001 in a cell in Excel, you will notice that Excel automatically removes the leading zeros (as it thinks these are unnecessary). While this is not an issue in most cases (as you wouldn’t leading zeros), in case you do need these then one of the solutions is to convert these numbers to text. This way, you get exactly what you enter. One common scenario where you might need this is when you’re working with large numbers – such as SSN or employee ids that have leading zeros.
Entering Large Numeric Values
Do you know that you can only enter a numeric value that is 15 digits long in Excel? If you enter a 16 digit long number, it will change the 16th digit to 0. So if you are working with SSN, account numbers, or any other type of large numbers, there is a possibility that your input data is automatically being changed by Excel. And what’s even worse is that you don’t get any prompt or error. It just changes the digits to 0 after the 15th digit. Again, this is something that is taken care of if you convert the number to text.
Changing Numbers to Dates
This one erk a lot of people (including myself). Try entering 01-01 in Excel and it will automatically change it to date (01 January of the current year). So if you enter anything that is a valid date format in Excel, it would be converted to a date. A lot of people reach out to me for this as they want to enter scores in Excel in this format, but end up getting frustrated when they see dates instead. Again, changing the format of the cell from number to text will help keep the scores as is. Now, let’s go ahead and have a look at some of the methods you can use to convert numbers to text in Excel.
Convert Numbers to Text in Excel
In this section, I will cover four different ways you can use to convert numbers to text in Excel. Not all these methods are the same and some would be more suitable than others depending on your situation. So let’s dive in!
Adding an Apostrophe
If you manually entering data in Excel and you don’t want your numbers to change the format automatically, here is a simple trick: Add an apostrophe (‘) before the number So if you want to enter 001, enter ‘001 (where there is an apostrophe before the number). And don’t worry, the apostrophe is not visible in the cell. You will only see the number. When you add an apostrophe before a number, it will change it to text and also add a small green triangle at the top left part of the cell (as shown in th image). It’s Exel way to letting you know that the cell has a number that has been converted to text. When you add an apostrophe before a number, it tells Excel to consider whatever follows as text. A quick way to visually confirm whether the cells are formatted as text or not is to see whether the numbers align to the left out to the right. When numbers are formatted as text, they align to the right by default (as they alight to the left) Even if you add an apostrophe before a number in a cell in Excel, you can still use these as numbers in calculations Similarly, if you want to enter 01-01, adding an apostrophe would make sure that it doesn’t get changed into a date. Although this technique works in all cases, it is only useful if you’re manually entering a few numbers in Excel. If you enter a lot of data in a specific range of rows/columns, use the next method.
Converting Cell Format to Text
Another way to make sure that any numeric entry in Excel is considered a text value is by changing the format of the cell. This way, you don’t have to worry about entering an apostrophe every time you manually enter the data. You can go ahead entering the data just like you usually do, and Excel would make sure that your numbers are not changed. Here is how to do this: The above steps would change the default formatting of the cells from General to Text. Now, if you enter any number or any text string in these cells, it would automatically be considered as a text string. This means that Excel would not automatically change the text you enter (such as truncating the leading zeros or converting entered numbers into dates) In this example, while I changed the cell formatting first before entering the data, you can also do this with cells that already have data in them. But remember that if you already had entered numbers that were changed by Excel (such as removing leading zeros or changing text to dates), that won’t come back. You will have to make that data entry again. Also, keep in mind that cell formatting can change in case you copy and paste some data to these cells. With regular copy-paste, it also copied the formatting from the copied cells. So it’s best to copy and paste values only.
Using the TEXT Function
Excel has an in-built TEXT function that is meant to convert a numeric value to a text value (where you have to specify the format of the text in which you want to get the final result). This method is useful when you already have a set of numbers and you want to show them in a more readable format or if you want to add some text as suffix or prefix to these numbers. Suppose you have a set of numbers as shown below, and you want to show all these numbers as five-digit values (which means to add leading zeros to numbers that are less than 5 digits). While Excel removes any leading zeros in numbers, you can use the below formula to get this: In the above formula, I have used “00000” as the second argument, which tells the formula the format of the output I desire. In this example, 00000 would mean that I need all the numbers to be at least five-digit long. You can do a lot more with the TEXT function – such as add currency symbol, add prefix or suffix to the numbers, or change the format to have comma or decimals. Using this method can be useful when you already have the data in Excel and you want to format it in a specific way. This can also be helpful in saving time when doing manual data entry, where you can quickly enter the data and then use the TEXT function to get it in the desired format.
Using Text to Columns
Another quick way to convert numbers to text in Excel is by using the Text to Columns wizard. While the purpose of Text to Columns is to split the data into multiple columns, it has a setting that also allows us to quickly select a range of cells and convert all the numbers into text with a few clicks. Suppose you have a data set is shown below, and you want to convert all the numbers in columns A into text. Below are the steps to do this: The above steps would instantly convert all these numbers in Column A into text. You notice that the numbers would now be aligned to the right (indicating that the cell content is text). There would also be a small green triangle at the top left part of the cell, which is a way Excel informs you that there are numbers that are stored as text. So these are four easy ways that you can use to quickly convert numbers to text in Excel. In case you only want this for a few cells where you would be manually entering the data, I suggest you use the apostrophe method. If you need to do data entry for more than a few cells, you can try changing the format of the cells from General to Text. And in case you already have the numbers in Excel and you want to convert them to text, you can use the TEXT formula method or the Text to Columns method I covered in this tutorial. I hope you found this tutorial useful. Other Excel tutorials you may also like:
Convert Text to Numbers in ExcelHow to Convert Serial Numbers to Dates in Excel Convert Date to Text in Excel – Explained with ExamplesHow to Convert Formulas to Values in ExcelConvert Time to Decimal Number in ExcelHow to Convert Inches to MM, CM, or Feet in Excel?Convert Scientific Notation to Number or Text in ExcelSeparate Text and Numbers in Excel