View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default TOOLBAR button or Keyboard Shortcut FOR Center Across Selection??

Assign this to a button.

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 Tue, 29 Apr 2008 03:59:00 -0700, RajenRajput1
wrote:

Hi,

I use Excel 2007 at work and Excel 2003 at home.

Is there a keyboard shortcut to center across selection for either of these
versions, pref 2007?

And secondly, does anyone know if there is a toolbar button for center
across selection, or perhaps a way of placing a button on the quick access
toolbar?

Merging cells is too easy to do and that is why I prefer it, however
formatting and selecting cells is becoming an issue with merging, and center
across selection has it's merits, but it's time consuming.

Thank for the advice, I hope someone can help.

Regards,

Rajen