Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting Blank rows after every row upto 2500 rows
Is there a command to insert blank rows automatically between already
existing data of more than 2000 lines? I need this to automatically copy and paste with ceratin number of blank rows to another software. Now what I do is a laborious process and takes a lot of time Can anyone please help? Thanks in advance |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting Blank rows after every row upto 2500 rows
this will insert rows
Sub insertrows() lr = Cells(Rows.Count, "a").End(xlUp).Row For i = lr To 2 Step -1 Rows(i).Insert Next i End Sub OR, if you just need space,consider doubling the row height. Sub makerowbigger() lr = Cells(Rows.Count, "a").End(xlUp).Row Rows("1:" & lr).RowHeight = 25 End Sub -- Don Guillett SalesAid Software "Manju" wrote in message oups.com... Is there a command to insert blank rows automatically between already existing data of more than 2000 lines? I need this to automatically copy and paste with ceratin number of blank rows to another software. Now what I do is a laborious process and takes a lot of time Can anyone please help? Thanks in advance |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting Blank rows after every row upto 2500 rows
pls try this code
Sub Macro1() Dim totR As Variant Dim k As Integer ActiveSheet.UsedRange.Select totR = Selection.Rows.Count k = 1 For i = 2000 To totR Step 2000 Range("A" & i + k).Select Selection.EntireRow.Insert k = k + 1 Next i Range("A1").Select End Sub "Manju" wrote: Is there a command to insert blank rows automatically between already existing data of more than 2000 lines? I need this to automatically copy and paste with ceratin number of blank rows to another software. Now what I do is a laborious process and takes a lot of time Can anyone please help? Thanks in advance |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting Blank rows after every row upto 2500 rows
Don Guillett wrote: this will insert rows Sub insertrows() lr = Cells(Rows.Count, "a").End(xlUp).Row For i = lr To 2 Step -1 Rows(i).Insert Next i End Sub OR, if you just need space,consider doubling the row height. Sub makerowbigger() lr = Cells(Rows.Count, "a").End(xlUp).Row Rows("1:" & lr).RowHeight = 25 End Sub -- Don Guillett SalesAid Software Sorry Sir, Your first code didn't work. |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting Blank rows after every row upto 2500 rows
Dear Rafeek, Thanks
I had to insert manually row number for this to work. Any way thanks. that will do. Muhammed Rafeek M wrote: pls try this code Sub Macro1() Dim totR As Variant Dim k As Integer ActiveSheet.UsedRange.Select totR = Selection.Rows.Count k = 1 For i = 2000 To totR Step 2000 Range("A" & i + k).Select Selection.EntireRow.Insert k = k + 1 Next i Range("A1").Select End Sub "Manju" wrote: Is there a command to insert blank rows automatically between already existing data of more than 2000 lines? I need this to automatically copy and paste with ceratin number of blank rows to another software. Now what I do is a laborious process and takes a lot of time Can anyone please help? Thanks in advance |
#6
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting Blank rows after every row upto 2500 rows
Manju
Don's code works fine for me. What didn't it do for you? Gord Dibben MS Excel MVP On 21 Aug 2006 19:12:21 -0700, "Manju" wrote: Don Guillett wrote: this will insert rows Sub insertrows() lr = Cells(Rows.Count, "a").End(xlUp).Row For i = lr To 2 Step -1 Rows(i).Insert Next i End Sub OR, if you just need space,consider doubling the row height. Sub makerowbigger() lr = Cells(Rows.Count, "a").End(xlUp).Row Rows("1:" & lr).RowHeight = 25 End Sub -- Don Guillett SalesAid Software Sorry Sir, Your first code didn't work. |
#7
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting Blank rows after every row upto 2500 rows
Manju
If you are not happy with vb code an alternative is to set up a new column and insert number 1,3,5 etc until the last row of data. Then continue with 2,4,6 etc until you match the number of odd rows. Note you can use autofill - don't enter every number!. Then select the whole block and sort on the column with the numbers. You will then have 1=data,2=blank,3=data, 4=blank etc. Whole operation takes less than a minute to do. -- Don C "Manju" wrote: Is there a command to insert blank rows automatically between already existing data of more than 2000 lines? I need this to automatically copy and paste with ceratin number of blank rows to another software. Now what I do is a laborious process and takes a lot of time Can anyone please help? Thanks in advance |
#8
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting Blank rows after every row upto 2500 rows
Dear Sir,
That's what I require!. I am still new to VB. This kind of ideas is what I like and usually execute. Thanks a ton. DonCam65 wrote: Manju If you are not happy with vb code an alternative is to set up a new column and insert number 1,3,5 etc until the last row of data. Then continue with 2,4,6 etc until you match the number of odd rows. Note you can use autofill - don't enter every number!. Then select the whole block and sort on the column with the numbers. You will then have 1=data,2=blank,3=data, 4=blank etc. Whole operation takes less than a minute to do. -- Don C "Manju" wrote: Is there a command to insert blank rows automatically between already existing data of more than 2000 lines? I need this to automatically copy and paste with ceratin number of blank rows to another software. Now what I do is a laborious process and takes a lot of time Can anyone please help? Thanks in advance |
#9
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Inserting Blank rows after every row upto 2500 rows
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting blank rows in Excel. | Excel Discussion (Misc queries) | |||
Get number of rows that data takes up, including blank rows | Excel Worksheet Functions | |||
Help!! I have problem deleting 2500 rows of filtered rows!!!! | Excel Discussion (Misc queries) | |||
inserting columns within certain rows only | Excel Discussion (Misc queries) | |||
Automatically inserting rows | Excel Worksheet Functions |