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.
Learn more about Allen...
Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Creating a Center Across Selection Button.
If you have been using Excel for a decade or so, you know that in versions of the program up through Excel 95 there was a toolbar button that would center the contents of a particular cell across a number of columns. In Excel 97 this toolbar button was replaced with one that merges cells and centers the content within the merged cells. The difference, of course, between the two tools is that one merges prior to centering, and the other does not.
If you miss the old Center Across Selection button, you may wonder if you can ever get it back. (You probably know that you can do the same thing by displaying the Alignment tab of the Format Cells dialog box and then use the Horizontal drop-down list to choose Center Across Selection.) There is no built-in Center Across Selection tool that you can use, but you can create a simple macro that will do the same thing:
Sub CenterAcrossColumns() With Selection .HorizontalAlignment = xlCenterAcrossSelection .MergeCells = False End With End Sub
Once you have the macro, you can assign it to a shortcut key or a toolbar button.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (1944) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Creating a Center Across Selection Button.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!