+ Reply to Thread
Results 1 to 9 of 9

Inserting Blank rows after every row upto 2500 rows

  1. #1
    Manju
    Guest

    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. #2
    Don Guillett
    Guest

    Re: 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
    [email protected]
    "Manju" <[email protected]> wrote in message
    news:[email protected]...
    > 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. #3
    Muhammed Rafeek M
    Guest

    RE: 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. #4
    Manju
    Guest

    Re: 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
    > [email protected]



    Sorry Sir, Your first code didn't work.


  5. #5
    Manju
    Guest

    Re: 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. #6
    Gord Dibben
    Guest

    Re: 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" <[email protected]> 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
    >> [email protected]

    >
    >
    >Sorry Sir, Your first code didn't work.



  7. #7
    DonCam65
    Guest

    RE: 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. #8
    Manju
    Guest

    Re: 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. #9
    Don Guillett
    Guest

    Re: Inserting Blank rows after every row upto 2500 rows

    Whatever makes you happy....

    --
    Don Guillett
    SalesAid Software
    [email protected]
    "Manju" <[email protected]> wrote in message
    news:[email protected]...
    > 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
    >> >
    >> >

    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1