Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old July 14th 05, 10:15 PM
dforrest
 
Posts: n/a
Default Make Alignment options under format cells available as shortcut

Make alignment options, under Format Cells, available as a shortcut, button,
icon on the toolbar. The options that I am particularly interested in a
Text Control, which allows you to uncheck merged cells(Merging cells is an
Icon on the format toolbar, but removing the merge is not) The wrap text
option is also something I use a lot and would like for it to be easier to
get to. Also, I am interested in vertical text alignment, which allows you
to put the text at the top of the cell.

Any help would be appreciated as I use the functions many times during the
day.

  #2   Report Post  
Old July 14th 05, 10:58 PM
Earl Kiosterud
 
Posts: n/a
Default

D,

You can roll your own shortcuts to do stuff like that with macros. Just
record a macro as you do the formatting. For your example of turning off
Merge Cells, do this:

Select a merged cell first.

Start the macro recorder with Tools - Macro - Record new macro. To make the
macro available when any workbook is open, set "Store macro in" to "Personal
macro workbook." You can assign the shortcut key there, or later.

Now it's recording. Don't do any selecting or other stuff -- just do the
formatting or whatever you want to have the macro do.

Stop the macro recorder (Stop button on macro recording toolbar, or Tools -
Macro - Stop recording).

Now Alt-F11 to the VBE, open the module in Personal.xls, and take out all
the stuff you don't want done. That's because the macro records the
settings for all the options in the Format - Cells - Alignment dialog, not
just the one that was changed.

Recording while turning off merge cells produced:

Sub MergeOff()
' MergeOff Macro
' Macro recorded 7/14/2005 by Earl
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End Sub

....which you would reduce to:

Sub MergeOff()
' MergeOff Macro
' Macro recorded 7/14/2005 by Earl
With Selection
. .MergeCells = False
End With
End Sub

Or more succinctly:

Sub MergeOff()
' MergeOff Macro
' Macro recorded 7/14/2005 by Earl
Selection.MergeCells = False
End Sub

If you didn't assign the macro to a shortcut key earlier, do it now with
Tools - Macro - Macros. Using the Shift key ensures that a standard Excel
shortcut doesn't get replaced.
--
Earl Kiosterud
www.smokeylake.com

"dforrest" wrote in message
...
Make alignment options, under Format Cells, available as a shortcut,
button,
icon on the toolbar. The options that I am particularly interested in
a
Text Control, which allows you to uncheck merged cells(Merging cells is an
Icon on the format toolbar, but removing the merge is not) The wrap text
option is also something I use a lot and would like for it to be easier to
get to. Also, I am interested in vertical text alignment, which allows
you
to put the text at the top of the cell.

Any help would be appreciated as I use the functions many times during the
day.





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I format cells and enter data to be valued for TIME and th. George Excel Worksheet Functions 1 April 11th 05 07:23 PM
format cells Alfred Excel Worksheet Functions 2 April 1st 05 03:43 PM
Date format of cells Alex Excel Discussion (Misc queries) 1 March 30th 05 01:47 PM
Format Validation Cells John B Excel Discussion (Misc queries) 1 March 16th 05 02:21 PM
make a conditional format the default Fred Evans Excel Discussion (Misc queries) 3 December 6th 04 06:01 AM


All times are GMT +1. The time now is 02:24 PM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright 2004-2020 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017