Written by Allen Wyatt (last updated August 22, 2020)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
Iana wants to AutoFill a column of sequential numbers as "1.", "2.", etc., through "150.". The AutoFill will only work without the trailing period, but she wants the period there.
As Iana has discovered, AutoFill doesn't do a great job on figuring out how to "increment" text. It does OK if you are working with well-established sequences, such as the alphabet or days of the week, but it is downright stupid when it comes to most other text values. And, unfortunately, entering a number (1) followed by a period places a text string (1.) in the cell. Bingo! AutoFill chokes.
There are at least three potential solutions. The first is to stick to numbers (which AutoFill can work with) and apply a custom format to the cells in order to add the period. Follow these steps:
Figure 1. The Number tab of the Format Cells dialog box.
Your numbers should now all appear just fine with a trailing period. And, best of all, they are still numbers so you could do math with them, if necessary.
A couple of ExcelTips subscribers suggested a second method to get sequential numbers with a trailing period. This method uses a formula and results in numbers without applying a custom format to the cells. Follow these steps:
=Row(A1)&"."
Another approach is to go ahead and expect that your numbers will end up as text. In this case, you should make sure that columns A and B are empty and then follow these steps:
=A1 & "."
Your numbers should now all appear just fine, with the trailing period, in column A. The difference between this approach and the earlier approach is that in this case the numbers aren't really numbers in the eyes of Excel—they are text values.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (13294) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Sometimes you have too much information in a cell and you need to "pare down" what is there to get to the info you really ...
Discover MoreExcel allows you to use multiple colors to format the text in a cell. If you want to later separate that text to ...
Discover MoreSometimes getting the right thing to show up in a cell can be a bit tricky when working with dates. If you enter a year ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments