Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 187
Default A button for Center Across Selection

In the old versions of Excel there was a button for Center Across Selection,
which has now turned to Merge and Center. If this button is pressed with
multiple rows, it swallows all the rows below the first row, whereas the old
version button functions it properly. Further this creates hassle with
sorting etc. I prefer the Merge and Center button to function as the old
Center Across Selection for multiple rows as we have a button now for merging
cells at the same time we do not have a button for Center Across Selection.
Am I right?

Jaleel

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default A button for Center Across Selection

Jaleel,
Add a custom button to a toolbar and assign this code to it...
'----------------
Sub CenterAcrossSelection()
On Error GoTo CenterErr
If TypeName(Selection) = "Range" Then
If IsNull(Selection.HorizontalAlignment) Or _
Selection.HorizontalAlignment = xlHAlignCenterAcrossSelection Then
Selection.HorizontalAlignment = xlHAlignGeneral
Selection.VerticalAlignment = xlVAlignBottom
Else
Selection.HorizontalAlignment = xlHAlignCenterAcrossSelection
Selection.VerticalAlignment = xlVAlignCenter
End If
End If
Exit Sub
CenterErr:
Beep
End Sub
------------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware




"Jaleel"
wrote in message
In the old versions of Excel there was a button for Center Across Selection,
which has now turned to Merge and Center. If this button is pressed with
multiple rows, it swallows all the rows below the first row, whereas the old
version button functions it properly. Further this creates hassle with
sorting etc. I prefer the Merge and Center button to function as the old
Center Across Selection for multiple rows as we have a button now for merging
cells at the same time we do not have a button for Center Across Selection.
Am I right?
Jaleel


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default A button for Center Across Selection

I cannot recall any version of Excel having a "Center acrosss selection" button.

I built a macro years ago when running Excel 97.

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 Mon, 2 Oct 2006 06:35:02 -0700, Jaleel
wrote:

In the old versions of Excel there was a button for Center Across Selection,
which has now turned to Merge and Center. If this button is pressed with
multiple rows, it swallows all the rows below the first row, whereas the old
version button functions it properly. Further this creates hassle with
sorting etc. I prefer the Merge and Center button to function as the old
Center Across Selection for multiple rows as we have a button now for merging
cells at the same time we do not have a button for Center Across Selection.
Am I right?

Jaleel

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default A button for Center Across Selection

In my V2003 Center Across Selection is available in Format Cells | Alignment
| Text Alignment, Horizontal -- scroll down.
--
Grinny


"Jaleel" wrote:

In the old versions of Excel there was a button for Center Across Selection,
which has now turned to Merge and Center. If this button is pressed with
multiple rows, it swallows all the rows below the first row, whereas the old
version button functions it properly. Further this creates hassle with
sorting etc. I prefer the Merge and Center button to function as the old
Center Across Selection for multiple rows as we have a button now for merging
cells at the same time we do not have a button for Center Across Selection.
Am I right?

Jaleel

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 187
Default A button for Center Across Selection

Thanks Jim. Thanks Gord. It worked perfectly. Now I have a button for CAS.

Regards,

Jaleel

"Jaleel" wrote:

In the old versions of Excel there was a button for Center Across Selection,
which has now turned to Merge and Center. If this button is pressed with
multiple rows, it swallows all the rows below the first row, whereas the old
version button functions it properly. Further this creates hassle with
sorting etc. I prefer the Merge and Center button to function as the old
Center Across Selection for multiple rows as we have a button now for merging
cells at the same time we do not have a button for Center Across Selection.
Am I right?

Jaleel

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc

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
Add "left align across selection" cell formatting Monty Analyst Excel Worksheet Functions 2 November 5th 08 04:17 PM
ummm, ummm, HELP!!! phattony72 Excel Discussion (Misc queries) 19 January 13th 07 05:02 PM
Use the Merge & Center Button with unprotected Cells - sheet prote Dennis Cantellops Setting up and Configuration of Excel 1 September 22nd 06 12:49 AM
Max Value in a column exclude selection - Excel VBA magix Excel Discussion (Misc queries) 3 November 5th 05 10:18 PM
How do I setup a spin button in excel Andy K Excel Discussion (Misc queries) 1 November 26th 04 10:08 PM


All times are GMT +1. The time now is 10:10 AM.

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

About Us

"It's about Microsoft Excel"