+ Reply to Thread
Results 1 to 6 of 6

insert multiple new lines in one go, at every second row

  1. #1
    Registered User
    Join Date
    05-07-2014
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    23

    insert multiple new lines in one go, at every second row

    Hi,

    how do you insert multiple new lines in one go, in every second row?

    so, this is what it currently looks like:
    A
    1 Catherine
    2 Eamon
    3 Tom
    4 Joe
    5 Mick
    6 Ellen

    Now I want to insert a new line in between each row:
    A
    1 Catherine
    2 new line
    3 Eamon
    4 new line
    5 Joe
    etc etc
    Last edited by edunne; 08-07-2014 at 05:33 AM. Reason: incorrect row labelling

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: insert multiple new lines in one go, at every second row

    easiest is to number the rows in another column
    A
    B
    1
    A Catherine
    1
    2
    B Eamon
    2
    3
    C Tom
    3
    4
    D Joe
    4
    5
    E Mick
    5
    6
    F Ellen
    6
    7
    1
    8
    2
    9
    3
    10
    4
    11
    5
    12
    6
    then sort by the numbered column
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    05-07-2014
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: insert multiple new lines in one go, at every second row

    Quote Originally Posted by martindwilson View Post
    easiest is to number the rows in another column
    A
    B
    1
    A Catherine
    1
    2
    B Eamon
    2
    3
    C Tom
    3
    4
    D Joe
    4
    5
    E Mick
    5
    6
    F Ellen
    6
    7
    1
    8
    2
    9
    3
    10
    4
    11
    5
    12
    6
    then sort by the numbered column
    Sorry I don't understand - how does this create a new blank line in between the data i have already?

  4. #4
    Forum Contributor satputenandkumar0's Avatar
    Join Date
    11-08-2012
    Location
    Pune, India
    MS-Off Ver
    Office xp & Office 2007
    Posts
    398

    Re: insert multiple new lines in one go, at every second row

    Dear edunne,

    You can try with VBA code

    Please Login or Register  to view this content.
    Last edited by satputenandkumar0; 08-07-2014 at 05:58 AM.
    Regards,
    Nandkumar S.
    ---------------------------------------------------------------
    Don't forget to Click on * if you like my solution.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: insert multiple new lines in one go, at every second row

    try it just sort column a and b by column b
    Attached Files Attached Files
    Last edited by martindwilson; 08-07-2014 at 05:59 AM.

  6. #6
    Registered User
    Join Date
    05-07-2014
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    23

    Re: insert multiple new lines in one go, at every second row

    Thank you very much, thats excellent!
    Quote Originally Posted by martindwilson View Post
    try it just sort column a and b by column b

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Insert lines+ C/P according to lines with keywords
    By jullianm in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-05-2014, 08:49 AM
  2. Userform: insert multiple lines by text value
    By shan_shan088 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-04-2013, 04:23 AM
  3. [SOLVED] Insert blank lines to make the total number of lines 67
    By raghuprabhu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-29-2012, 07:34 AM
  4. Replies: 0
    Last Post: 02-09-2012, 11:53 AM
  5. [SOLVED] Write code to insert multiple lines
    By Frantic Excel-er in forum Excel General
    Replies: 0
    Last Post: 06-16-2005, 08:05 PM

Tags for this Thread

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