Center across selection

E

Elardus

I use "Center across selection" and almost never "Merge cells", which is
generally a bad choice (across columns anyway).

I wish to add an icon or otherwsie modify the "Merge Cells" icon through the
toolbars "customization" process. but unfortunately I cannot find "center
across selection" amonst the "commands- format"choices.

Which means I have to do my "center cross selctiion) always via the menu....

How do I add / modify an icon in my "Formatting" toolbar?
 
G

Gord Dibben

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top