Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
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.
More Power! For some people, the prospect of creating macros can be scary. Those who conquer their fears, however, find they become much more confident and productive once they learn how to make Excel do exactly what they want. ExcelTips: The Macros is an invaluable source for learning Excel macros. You are introduced to the topic in bite-sized chunks, pulled from past issues of ExcelTips. Learn at your own pace, exactly the way you want. Check out ExcelTips: The Macros today!