LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 557
Default MERGE ROW CELLS BY MACRO

Hi i have this macro (please see below)

Sub InsertIt()
Dim LastRow As Long
Dim StartRow As Long
StartRow = Cells(Rows.Count, 1).End(xlUp).Row - 1
Cells(StartRow + 1, 1).Resize(6, 1).EntireRow.Insert
Cells(StartRow + 1, 9).Resize(6, 6).Merge
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
Application.ScreenUpdating = False
With Range(Cells(StartRow, 1), Cells(LastRow, 1))
..DataSeries Rowcol:=xlColumns, Type:=xlLinear, Date:=xlDay, _
Step:=1, Trend:=False
End With
Application.ScreenUpdating = True

End Sub

This macro basically insert 6 rows and i wanted to merge each row
cells (the one been inserted
by macro) from coloumn "I" to "N". one of online friend send me this
line to insert in macro to merge cells.
Cells(StartRow + 1, 9).Resize(6, 6).Merge
by putting this line in macro works fine but instead of merging each
row from coloumn "I" to "N" it merge 6 rows and make one big cell. i
want those rows (the one been inserted by macro) to merge each
saperatly from coloumn "I" to "N". Please any body can help as i need
this for my project. Thanks.
 
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
Use a macro to merge cells in a column that are the same Josh Craig Excel Programming 2 July 16th 06 01:14 AM
Macro to Merge Cells Josh O. Excel Programming 1 June 2nd 06 12:55 PM
Need help with merge cells in a macro Armando[_3_] Excel Programming 1 June 15th 04 09:08 PM
Macro to merge cells JA Excel Programming 0 June 3rd 04 03:39 PM
Merge cells using macro Tom Ogilvy Excel Programming 0 August 7th 03 07:20 PM


All times are GMT +1. The time now is 07:31 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"