ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   merge cells (https://www.excelbanter.com/excel-programming/427058-merge-cells.html)

Woodi2

merge cells
 
How do i merge cells using code, is it possible?

I would like to mergecells as follows
ActiveCell.Offset(0, 8) and merge it with the 2 cells below, if poosible,
also change the colour to cyan.

Jacob Skaria

merge cells
 
Range("A1:A3").Merge
Range("A1:A3").Interior.Color = vbCyan

If this post helps click Yes
---------------
Jacob Skaria


"Woodi2" wrote:

How do i merge cells using code, is it possible?

I would like to mergecells as follows
ActiveCell.Offset(0, 8) and merge it with the 2 cells below, if poosible,
also change the colour to cyan.


Patrick Molloy[_2_]

merge cells
 
Sub demoTest()
MergDemo "A1:A3"
End Sub
Sub MergDemo(target As String)
With Range(target)
.Merge
.Interior.Color = vbCyan
End With
End Sub

"Woodi2" wrote:

How do i merge cells using code, is it possible?

I would like to mergecells as follows
ActiveCell.Offset(0, 8) and merge it with the 2 cells below, if poosible,
also change the colour to cyan.



All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com