I was wondering if there is a keyboard shortcut for the button on the format
toolbar for centering data in a cell. Any help is appreciated.
I was wondering if there is a keyboard shortcut for the button on the format
toolbar for centering data in a cell. Any help is appreciated.
Record a macro to do the cnte and assign it a shortcut key.
Start recording (Tools, Macros, Record New Macro)
Give it a meaningful name (e.g. CentreText)
Select your letter of choice (I use "e") and put that in the Shortcut Key field.
Ensure macro is being recoprded in your "Personal Wookbook" to make it available in all workbooks.
Click OK to start recording.
Click the toolbar button to cente text.
Stop recording (Tools, Macro, Stop Recording)
Now you need to edit the recorded macro to remove any reference to the cell you centred during the recording.
You may need to "unhide" the personal wookbook (Window, Unhide) first.
To edit the macro ...
Tools, Macro, Macros.
Select your macro and click Edit.
Make your macro look something like this ...
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.ShrinkToFit = False
.MergeCells = False
End With
... and then quit (File, Quit).
Re-hide your Personal workbook (Windows, Hide)
Close Excel and you will be prompted to save your Personal Workbook - do so.
Now to centre text, just press CTRL and whatever letter you chose above (I used "e").
Tony
Hi Phil,
You would have to create a macro and assign your own button
Creating a Center Across Selection Button (this is the code)
http://exceltips.vitalnews.com/Pages...on_Button.html
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm
"Phil_K" <Phil_K@discussions.microsoft.com> wrote in message news:CFD029CB-D7CE-4FAA-9D08-469B0984C76C@microsoft.com...
> I was wondering if there is a keyboard shortcut for the button on the format
> toolbar for centering data in a cell. Any help is appreciated.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks