+ Reply to Thread
Results 1 to 5 of 5

Move part of row to 2nd row, another part of row to 3rd row

  1. #1
    Registered User
    Join Date
    05-02-2014
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    3

    Move part of row to 2nd row, another part of row to 3rd row

    I have an issue and I don't know if there's a way out. I have a large spreadsheet (8000 Rows) that I need to manipulate, where data was put into additional columns when it should've been put into a 2nd and 3rd row instead. Each entry spans one large row instead of 3 small rows as it should be. So now I need to create two new rows after each existing row. Then take data in columns C-F, and move it to the next row (columns A-D). Then take columns G-H and move that to the 3rd row in the series (Columns A-B).

    So an example would be:

    Original Data:

    A1 A2 A3 A4 A5 A6 A7 A8



    B1 B2 B3 B4 B5 B6 B7 B8


    Resulting Data:

    A1 A2
    A3 A4 A5 A6
    A7 A8

    B1 B2
    B3 B4 B5 B6
    B7 B8

    And so on, until 8000 rows becomes 24000 (or 32000) rows. Is there any help for me out there?

    Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    01-19-2010
    Location
    Melbourne Australia
    MS-Off Ver
    latest is Excel 2016. have older versions
    Posts
    624

    Re: Move part of row to 2nd row, another part of row to 3rd row

    Hi, and welcome to the forums.

    Please take the time to read the forum rules to gain an understanding of "good form". It is always a great idea to post a sample workbook even for seemingly simple requests and you often get a working solution back as a bonus.

    Your problem is reasonably simple. I am guessing that as this is your first post that you do not have much VBA experience. I came across a couple of very useful sites for new people in VBA which i suggest you have a look at:

    http://www.homeandlearn.org/index.html
    http://excelvbatutor.com/vba_tutorial.html

    Post a sample workbook to use and I will take a look for you. Add an attachment by using the "Go Advanced" link below this reply input panel

    Cheers

    Jmac

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Move part of row to 2nd row, another part of row to 3rd row

    Hi, buggseyosu,

    assuming that the data is in a continuing range of rows by now and handles values (no formulas) starting with A1 you could try the following code on a copy of the worksheet:
    Please Login or Register  to view this content.
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    05-02-2014
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Move part of row to 2nd row, another part of row to 3rd row

    Hi Jmac,

    Thank you for the reply. I am new to the forum so thank you for the info, and I will read those links. As for a sample, I have created one with two tabs: a current tab and future state tab. I added headers but that's just for readability, I will not have headers in my actual data.

    Thanks again!
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-02-2014
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Move part of row to 2nd row, another part of row to 3rd row

    Holger - that was it! Thanks a lot man!

+ 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. 2 part piece here. One part counter of up and down, fill in of blank cells.
    By greenfox74 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2012, 10:09 PM
  2. Find Part number through Macro and output to associated part to certain cell
    By boylers75 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2012, 04:32 PM
  3. move part of a cell content
    By slowhand in forum Excel General
    Replies: 2
    Last Post: 04-14-2006, 11:20 AM
  4. Move Part of Cell String
    By tom in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-13-2005, 02:05 PM
  5. move part of cell to new column
    By S.E. in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-03-2005, 12:06 PM

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