![]() |
Merge vertically ?
The button "merge across" allows you to pick a group of cells, and
merges them along rows. I need to pick a group of cells and have them merge in columns. Perhaps someone has seen such a need, and has a code? Thanks |
Answer: Merge vertically ?
Yes, you can merge cells vertically in Excel using the "Merge & Center" option. Here are the steps to do so:
Alternatively, you can use a keyboard shortcut to merge cells vertically. Here's how:
|
Merge vertically ?
It will merge columns too!
"bbelly" wrote: The button "merge across" allows you to pick a group of cells, and merges them along rows. I need to pick a group of cells and have them merge in columns. Perhaps someone has seen such a need, and has a code? Thanks |
Merge vertically ? Clarification
Toppers wrote:
It will merge columns too! "bbelly" wrote: The button "merge across" allows you to pick a group of cells, and merges them along rows. I need to pick a group of cells and have them merge in columns. Perhaps someone has seen such a need, and has a code? Thanks Perhaps you misunderstand my request? Given a group of cells A1 - D4, applying 'merge across' to this group creates four merged cells ... _________________ | A1 B1 C1 D1 | |________________| | A2 B2 C2 D2 | |________________| | A3 B3 C3 D3 | |________________| | A4 B4 C4 D4 | |________________| I want to select this group, apply 'merge up&down'( 'merge vertical), and get four cells merged thus ... ____________________ | A1 | A2 | A3 | A4 | | | | | | | B1 | B2 | B3 | B4 | | | | | | | C1 | C2 | C3 | C4 | | | | | | | D1 | D2 | D3 | D4 | |____|____|____|____| Hope that illustrates better. |
Merge vertically ?
Use the "merge cells" button, not the "merge across" button.
Select the cells first then click on the button to merge vertically. Then be prepared for the usual problems with merged cells. Gord Dibben MS Excel MVP On Sun, 18 Mar 2007 14:25:09 GMT, bbelly wrote: The button "merge across" allows you to pick a group of cells, and merges them along rows. I need to pick a group of cells and have them merge in columns. Perhaps someone has seen such a need, and has a code? Thanks |
Merge vertically ?
Option Explicit
Sub testme() Dim myRng As Range Dim myCol As Range Set myRng = Selection For Each myCol In myRng.Columns myCol.Merge Next myCol End Sub Select your range first, then run the macro. bbelly wrote: The button "merge across" allows you to pick a group of cells, and merges them along rows. I need to pick a group of cells and have them merge in columns. Perhaps someone has seen such a need, and has a code? Thanks -- Dave Peterson |
Merge vertically ? Clarification
What you want is "transpose"
Select A1:D4 and copy. Select a cell out of the range and Paste SpecialTransposeOKEsc. Then do the merge across. Gord Dibben MS Excel MVP On Sun, 18 Mar 2007 16:15:56 GMT, bbelly wrote: Toppers wrote: It will merge columns too! "bbelly" wrote: The button "merge across" allows you to pick a group of cells, and merges them along rows. I need to pick a group of cells and have them merge in columns. Perhaps someone has seen such a need, and has a code? Thanks Perhaps you misunderstand my request? Given a group of cells A1 - D4, applying 'merge across' to this group creates four merged cells ... _________________ | A1 B1 C1 D1 | |________________| | A2 B2 C2 D2 | |________________| | A3 B3 C3 D3 | |________________| | A4 B4 C4 D4 | |________________| I want to select this group, apply 'merge up&down'( 'merge vertical), and get four cells merged thus ... ____________________ | A1 | A2 | A3 | A4 | | | | | | | B1 | B2 | B3 | B4 | | | | | | | C1 | C2 | C3 | C4 | | | | | | | D1 | D2 | D3 | D4 | |____|____|____|____| Hope that illustrates better. |
Merge vertically ? Clarification
bbelly
Have you tried Toppers solution? Either we do not understand what you mean by the "Merge Across" button or you have something that I don't. What version of excel are you running? On xl2k I have "merge & center" button that works both ways. Merges rows within a column and colums withing a row. Mike Rogers "bbelly" wrote: Toppers wrote: It will merge columns too! "bbelly" wrote: The button "merge across" allows you to pick a group of cells, and merges them along rows. I need to pick a group of cells and have them merge in columns. Perhaps someone has seen such a need, and has a code? Thanks Perhaps you misunderstand my request? Given a group of cells A1 - D4, applying 'merge across' to this group creates four merged cells ... _________________ | A1 B1 C1 D1 | |________________| | A2 B2 C2 D2 | |________________| | A3 B3 C3 D3 | |________________| | A4 B4 C4 D4 | |________________| I want to select this group, apply 'merge up&down'( 'merge vertical), and get four cells merged thus ... ____________________ | A1 | A2 | A3 | A4 | | | | | | | B1 | B2 | B3 | B4 | | | | | | | C1 | C2 | C3 | C4 | | | | | | | D1 | D2 | D3 | D4 | |____|____|____|____| Hope that illustrates better. |
Merge vertically ?
Dave Peterson wrote:
Option Explicit Sub testme() Dim myRng As Range Dim myCol As Range Set myRng = Selection For Each myCol In myRng.Columns myCol.Merge Next myCol End Sub Select your range first, then run the macro. bbelly wrote: The button "merge across" allows you to pick a group of cells, and merges them along rows. I need to pick a group of cells and have them merge in columns. Perhaps someone has seen such a need, and has a code? Thanks Thanks ... This is the answer to the question I was asking. I'll try it tomorrow. Specifically, to pick a range, and have 'merge vertically' applied to the lot, instead of picking two cells one on another, applying merge, and repeating about 15 times for each affected row set. Again, thank you |
Merge vertically ?
bbelly wrote:
Dave Peterson wrote: Option Explicit Sub testme() Dim myRng As Range Dim myCol As Range Set myRng = Selection For Each myCol In myRng.Columns myCol.Merge Next myCol End Sub Select your range first, then run the macro. bbelly wrote: The button "merge across" allows you to pick a group of cells, and merges them along rows. I need to pick a group of cells and have them merge in columns. Perhaps someone has seen such a need, and has a code? Thanks Thanks ... This is the answer to the question I was asking. I'll try it tomorrow. Specifically, to pick a range, and have 'merge vertically' applied to the lot, instead of picking two cells one on another, applying merge, and repeating about 15 times for each affected row set. Again, thank you Please be advised that I applied this code to a button, works like a charm ! Thank You |
All times are GMT +1. The time now is 10:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com