shortcut for Function 'Merge and Centre'

K

KEYUR

Is there a shortcut for function 'merge and centre'. if
not can we add one, how?

thanks for any help.
 
D

Don Guillett

right click on the toolbar>customize>commands>find it and drag to toolbar.

However, you might prefer

Sub CenterAcross()
Selection.HorizontalAlignment = xlCenterAcrossSelection
End Sub
You could assign to a custom button on your toolbar
 
N

Norman Harker

Hi Keyur!

Did you know that there was a Merge and Center button that you can use
on the format toolbar? If it's not there you can use:

View > Toolbars > Customize > Commands
You'll find it under Format.

Or you could use the following subroutine and allocate a keyboard
shortcut to it:

Sub MergeAndCenter()
With Selection
.HorizontalAlignment = xlCenter
.MergeCells = True
End With
End Sub

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
K

Keyur

thanks for the help.

but sorry i also need to know if there's a Keyboard
shortcut like for italics it's 'Ctrl+i'.

thanks
 
G

Guest

You can add a button to your toolbar

Tools>Customize>Commands>Format>roll down to item 20

However, merging can cause all kinds of problems. Especially when selecting full columns or doing fills

I would suggest you use center_across_selection instead. Unfortunately there is no longer a button available for this. However you can still use it from the format menu

Format>Cells>Alignment>Horizontal>Center_Across_Selectio

I set up a macro to do this, and assigned it to a toolbar button

Sub Center_across_selection(
With Selectio
.HorizontalAlignment = xlCenterAcrossSelectio
End Wit
End Su

I haven't been able to find a shortcut key for any of the alignments

Good Luck
Marek Graesse
(e-mail address removed)
----- KEYUR wrote: ----

Is there a shortcut for function 'merge and centre'. if
not can we add one, how

thanks for any help
 
K

keyur

thanks for all the help. yes i was able to find it on the
toolbar with the help but is there a keyboard shortcut
also available for that.

thanks
 
N

Norman Harker

Hi Keyur!

You can access the list of keyboard shortcuts using Help. Search on
"Keyboard Shortcuts"

I can't see one listed.

Also you can download a workbook with them all listed concisely from:

Chip Pearson:
http://www.cpearson.com/excel/ShortCuts.htm

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
D

David McRitchie

The consensus seems to be an overwhelming, No, and I don't'
see it in my list of shortcut keys from help either.
Shortcut Keys in Excel 2000 (Excel Vers. 9)
http://www.mvps.org/dmcritchie/excel/shortx2k.htm.
The version of Excel isn't going to matter much, especially upward

I understand you want to avoid using the mouse.
But seeing as you don't want to use the mouse to invoke a button,
how do expect to make a selection to run such a keyboard
shortcut on without using the mouse ?

Is the reason you want a built in shortcut and not interested
in a macro because you want to be to use or document use
by anyone, anywhere, anyplace including when macros are
suppressed. If this is strictly for yourself it shouldn't matter..

Since you do have an interest in merging cells you might want
to take a look at
Merge and Unmerge Cells
http://www.mvps.org/dmcritchie/excel/merge.htm
 

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