#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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.

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
Automatically merge mulitiple cells to one cells Edward Wang Excel Worksheet Functions 5 September 15th 09 07:56 PM
Select Merged Cells and Unmerge Spread Merge Data To All Cells rtwiss via OfficeKB.com Excel Programming 2 October 2nd 08 04:24 AM
how do I merge cells into one then delete the original cells? LLR Excel Worksheet Functions 2 March 7th 08 10:59 PM
How can I have formatting options like merge cells ,Bold,active for the unlocked cells of the protected worksheet.Is it possible in excel? divya Excel Programming 2 July 20th 06 02:04 PM
How do I merge cells in Excel, like just 2 cells to make one big . chattacat Excel Discussion (Misc queries) 2 January 19th 05 04:25 PM


All times are GMT +1. The time now is 03:32 PM.

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"