ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Inserting rows (https://www.excelbanter.com/excel-worksheet-functions/28398-inserting-rows.html)

Niranjan

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



R.VENKATARAMAN

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






All times are GMT +1. The time now is 01:25 AM.

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