Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Microsoft Excel 2000. How can I write a macro which will
automatically merge every three cells in Row 10. That is merge column a, b, c, then d, e, f etc. Thanks in advance, db |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
db,
Sub TryNow() Dim i As Integer For i = 0 To 84 Cells(10, i * 3 + 1).Resize(1, 3).Merge Next i End Sub The last cell on row 10 won't be merged.... HTH, Bernie MS Excel MVP "David Bateman" wrote in message ... I am using Microsoft Excel 2000. How can I write a macro which will automatically merge every three cells in Row 10. That is merge column a, b, c, then d, e, f etc. Thanks in advance, db |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
one way:
Public Sub Merge3In10() Dim i As Long For i = 1 To Columns.Count - 3 - (Columns.Count Mod 3) Step 3 Cells(10, i).Resize(1, 3).Merge Next i End Sub In article , "David Bateman" wrote: I am using Microsoft Excel 2000. How can I write a macro which will automatically merge every three cells in Row 10. That is merge column a, b, c, then d, e, f etc. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing font color of protected cells programatically | Excel Discussion (Misc queries) | |||
how do I merge cells into one then delete the original cells? | Excel Worksheet Functions | |||
Can't unmerge merged cells programatically | Excel Programming | |||
Programatically read & write excel cells | Excel Programming | |||
Increasing the width/height of cells programatically | Excel Programming |