View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default How do I make 2 cells become one without changing column size

Mike

If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

First...create a backup copy of your original workbook.

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project by name and select it.

Right-click and InsertModule. Paste the code in there. Save the
workbook and hit ALT + Q to return to your workbook.

Run the macro by going to ToolMacroMacros.

You can also assign this macro to a button or a shortcut key combo.

To place a button on a Toolbar...ToolsCustomizeCommandsMacros.

Drag the smiley-face button to your Toolbar.

Right-click and "Assign Macro". Select TOGGLECENTERACROSS and OK

Note: when you right-click you will also see "Change Button Image". There are
a bunch of button faces to pick from if you don't like smiley.


Gord

On Sun, 25 Jun 2006 12:26:02 -0700, milo1339
wrote:

Hi Gord, Thanks for your feedback but I don't know how to enter the info you
provided. Can you provide further assistance. I appreciate it.

Mike

"Gord Dibben" wrote:

There is no "center across selection" button available unless it has been added
in 2007

I added a button and a macro to toggle on/off.

Sub TOGGLECENTERACROSS()
With Selection
If .HorizontalAlignment = xlCenterAcrossSelection Then
.HorizontalAlignment = xlGeneral
Else
Selection.HorizontalAlignment = xlCenterAcrossSelection
End If
End With
End Sub


Gord Dibben MS Excel MVP

On Sun, 25 Jun 2006 07:39:20 -0500, "Don Guillett"
wrote:

select columnsright clickformatalignmenthorizontalcenter across.
You can customize your toolbar to put the icon for this on the toolbar
I do NOT recommend merge cells.




Gord Dibben MS Excel MVP