#1   Report Post  
Niranjan
 
Posts: n/a
Default Inserting rows

Hi All,

I have a Excel sheet with some data and a COM addin written in C# to
manipulate the data in sheet. I want to insert an entire row between the two
consecutive rows in sheet and also copy the data from the previous row to
the new row cell by cell. I am a struggling with this for a bit. Any
suggestions or help will be appreciated.

Thanks and Regards

Niranjan Marathe


  #2   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

the following macro inserts row no. 5 (i.e.a row after row 4) and insert
row4 on row 5
Public Sub test()
Rows("5:5").Insert
Range(Range("A4"), Range("a4").End(xlToRight)).Copy
Range("a5").PasteSpecial
Application.CutCopyMode = False
Range("a1").Select
End Sub
is this what you want

Niranjan wrote in message
...
Hi All,

I have a Excel sheet with some data and a COM addin written in C# to
manipulate the data in sheet. I want to insert an entire row between the

two
consecutive rows in sheet and also copy the data from the previous row to
the new row cell by cell. I am a struggling with this for a bit. Any
suggestions or help will be appreciated.

Thanks and Regards

Niranjan Marathe




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
Inserting Rows w/formulas question Buckwheat Excel Worksheet Functions 4 May 7th 05 10:05 PM
inserting rows through external data source [email protected] Excel Discussion (Misc queries) 0 April 5th 05 03:16 AM
Searching for data and inserting new rows Kev427 Excel Discussion (Misc queries) 2 February 1st 05 07:15 AM
inserting a row between two existing rows Jennie New Users to Excel 6 January 8th 05 01:48 PM
Inserting Multiple Rows with Formulas ShineboxNJ Excel Worksheet Functions 2 November 18th 04 02:30 AM


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