+ Reply to Thread
Results 1 to 4 of 4

inserting rows automatically?

  1. #1

    inserting rows automatically?

    hi,

    Does any one know how to insert X number of rows after each rows?

    ie, want to insert 5 rows after row 1,another 10 rows after row 2...?

    eg. row 1: holiday inn
    row2: hyatt
    row3: ritz

    and i want to insert 5 rows after row 1, another 5 after row 2 etc, so
    that i can write down places names that have those hotels in the new
    rows:

    row1:holiday inn
    hk
    uk
    us
    japan
    norway
    row6:hyatt
    uk
    hawaii
    .... etc.

    How can you do it?

    Please help!
    Elaine


  2. #2
    Don Guillett
    Guest

    Re: inserting rows automatically?

    this should put a smile on your face
    Sub insert5rows()
    For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1
    Rows(i).Resize(5).Insert
    Next
    End Sub

    --
    Don Guillett
    SalesAid Software
    [email protected]
    <[email protected]> wrote in message
    news:[email protected]...
    > hi,
    >
    > Does any one know how to insert X number of rows after each rows?
    >
    > ie, want to insert 5 rows after row 1,another 10 rows after row 2...?
    >
    > eg. row 1: holiday inn
    > row2: hyatt
    > row3: ritz
    >
    > and i want to insert 5 rows after row 1, another 5 after row 2 etc, so
    > that i can write down places names that have those hotels in the new
    > rows:
    >
    > row1:holiday inn
    > hk
    > uk
    > us
    > japan
    > norway
    > row6:hyatt
    > uk
    > hawaii
    > ... etc.
    >
    > How can you do it?
    >
    > Please help!
    > Elaine
    >




  3. #3

    Re: inserting rows automatically?

    oh my god!!!
    That did put a smile on my face!!!
    Thank you so much!
    Elaine


    Don Guillett wrote:
    > this should put a smile on your face
    > Sub insert5rows()
    > For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1
    > Rows(i).Resize(5).Insert
    > Next
    > End Sub
    >
    > --
    > Don Guillett
    > SalesAid Software
    > [email protected]
    > <[email protected]> wrote in message
    > news:[email protected]...
    > > hi,
    > >
    > > Does any one know how to insert X number of rows after each rows?
    > >
    > > ie, want to insert 5 rows after row 1,another 10 rows after row 2...?
    > >
    > > eg. row 1: holiday inn
    > > row2: hyatt
    > > row3: ritz
    > >
    > > and i want to insert 5 rows after row 1, another 5 after row 2 etc, so
    > > that i can write down places names that have those hotels in the new
    > > rows:
    > >
    > > row1:holiday inn
    > > hk
    > > uk
    > > us
    > > japan
    > > norway
    > > row6:hyatt
    > > uk
    > > hawaii
    > > ... etc.
    > >
    > > How can you do it?
    > >
    > > Please help!
    > > Elaine
    > >



  4. #4
    Don Guillett
    Guest

    Re: inserting rows automatically?

    glad to make you smile

    --
    Don Guillett
    SalesAid Software
    [email protected]
    <[email protected]> wrote in message
    news:[email protected]...
    > oh my god!!!
    > That did put a smile on my face!!!
    > Thank you so much!
    > Elaine
    >
    >
    > Don Guillett wrote:
    >> this should put a smile on your face
    >> Sub insert5rows()
    >> For i = Cells(Rows.Count, "a").End(xlUp).Row To 2 Step -1
    >> Rows(i).Resize(5).Insert
    >> Next
    >> End Sub
    >>
    >> --
    >> Don Guillett
    >> SalesAid Software
    >> [email protected]
    >> <[email protected]> wrote in message
    >> news:[email protected]...
    >> > hi,
    >> >
    >> > Does any one know how to insert X number of rows after each rows?
    >> >
    >> > ie, want to insert 5 rows after row 1,another 10 rows after row 2...?
    >> >
    >> > eg. row 1: holiday inn
    >> > row2: hyatt
    >> > row3: ritz
    >> >
    >> > and i want to insert 5 rows after row 1, another 5 after row 2 etc, so
    >> > that i can write down places names that have those hotels in the new
    >> > rows:
    >> >
    >> > row1:holiday inn
    >> > hk
    >> > uk
    >> > us
    >> > japan
    >> > norway
    >> > row6:hyatt
    >> > uk
    >> > hawaii
    >> > ... etc.
    >> >
    >> > How can you do it?
    >> >
    >> > Please help!
    >> > Elaine
    >> >

    >




+ 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