+ Reply to Thread
Results 1 to 3 of 3

Macro - Insert given text in-between rows

  1. #1
    Registered User
    Join Date
    03-19-2013
    Location
    Nuneaton
    MS-Off Ver
    Excel 2010
    Posts
    2

    Macro - Insert given text in-between rows

    Hi All,
    I have a macro below that allows me to insert a selected amount of rows in between each row.

    Please Login or Register  to view this content.
    Is there a way to edit this so that it inserts a given text between each row instead of a blank one?

    EG,
    I have these 4 rows

    012266007074431
    012342002376343
    012682003340172
    013036003751731


    As it stands it turns out like this

    012266007074431

    012342002376343

    012682003340172

    013036003751731


    but i need it to turn out like this

    012266007074431
    *Text*
    012342002376343
    *Text*
    012682003340172
    *Text*
    013036003751731
    *Text*


    Ideally I would like to be able to insert anything where *Text* appears

    Help would be greatly appreciated
    Last edited by L_Checkley; 03-20-2013 at 03:34 PM.

  2. #2
    Registered User
    Join Date
    03-19-2013
    Location
    Nuneaton
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Macro help

    Also,
    Ideally im looking to replace the "j = InputBox("type the number of rows to be inserted")" line, as this is now redundant.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Macro help

    I_Checkley,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature below this post.

    Also,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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