+ Reply to Thread
Results 1 to 3 of 3

Split and rearrange one row into 3 rows (22000 rows to appr.66000)

  1. #1
    Registered User
    Join Date
    08-03-2021
    Location
    Berlin
    MS-Off Ver
    MS Office 2013
    Posts
    1

    Split and rearrange one row into 3 rows (22000 rows to appr.66000)

    Hello everyone!
    Rob here

    I am a total newbie to excel, no experience in programming generally unfortunately. I searched online for my answers and so far havent figured out how to to what I need.

    So I have a dataset that consists of roughly 22000 rows as shown below (A - AI). There are 35 columns, two of which are only as optical "seperators", column L and column X, however those
    columns could be deleted as they are not needed after the process, so all in all I have effectively 33 columns that I want to be devided to 3x11 columns.

    I attached a sample file, the first line shows what I have, couple lines below the format I want.
    To give an idea, I want to go from this format:

    PHP Code: 
    A B C D E G H I J K L M N O P Q R S T U V X Y Z AA AB AC AD AE AF AG AH AI 
    to:

    PHP Code: 
    A  B   C  D  E  F  G  H  I  J  K

    M  N   O  P  Q  R  S  T  U  V  W

    Y  Z  AA AB AC AD AE AF AG AH AI 
    Note, the column (that is, variable names) of A to K repeat from M to W and again from Y to to AI which is why I want to rearrange each row into 3 rows. For example A, M and Y would all have the name "#" and B,N,Z all have the name "type" and so on. I would want to keep the names of the columns.
    The first row of the file is all variable names, so the data starts in row 2.

    So, I want row 1 to be split and become row 1, 2 and 3. For the former row 2, I want it to be split to row 4, 5 and 6. And so on. Each row would have 11 columns.

    An example how each row looks (A-K, M-W and Y to AI)

    PHP Code: 
    2 XYZ 14.01.21 A1234567 123-456-789-a Test_01_AA_001 samplematerial 1,000 36567 5436356 0 

    Note, I left out columns "L" and "X" because they are empty and are optical "seperators" when all items are arranged in one row. I think it would make sense to not copy them when splitting since they are no longer needed. I could just delete them.

    In columns "W", "K" and "AI" value is "0" in all rows.


    Any help would be appreciated, as mentioned, I am totally new to excel and wasnt able to adapt other similar formulars.
    Also as a side note, I have a work laptop so I'm not the admin and some functions like VBA or macros probably are limited.

    Cheers
    Rob
    Attached Files Attached Files
    Last edited by Rob189; 08-03-2021 at 01:09 AM.

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Split and rearrange one row into 3 rows (22000 rows to appr.66000)

    Should works:

    Please Login or Register  to view this content.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Split and rearrange one row into 3 rows (22000 rows to appr.66000)

    I've used this formula in cell A2 of a new sheet (which I have called Split _rows):

    =IFERROR(INDEX(Tabelle1!$A$2:$AI$4,INT((ROWS($1:1)-1)/3)+1,COLUMNS($A:A)+MOD(ROWS($1:1)-1,3)*12),"")

    then copied this across to column K and down a few rows. I used the Format Painter icon to get the same formats that you have used.

    It might be a bit slow on your real file with 22,000 rows, but you will need to change the range (shown in red above) to suit your real data.

    Hope this helps.

    Pete
    Attached Files Attached Files

+ 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. Replies: 8
    Last Post: 03-24-2020, 11:02 AM
  2. How do I rearrange columns into rows?
    By pepsi_max_cherry in forum Excel General
    Replies: 2
    Last Post: 08-22-2017, 09:26 PM
  3. [SOLVED] VBA Split Cell Contents to New Rows & Copy Cells containing single values to the new rows
    By jaimelwilson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-14-2017, 05:30 PM
  4. split/separate rows based on criteria and send those rows by mail
    By katu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-09-2014, 08:59 AM
  5. [SOLVED] Need VBA code to count number of rows & split into group of 7 rows in same sheet
    By amy_d2 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-05-2013, 11:03 AM
  6. Macro to split a cell data into rows and copying other cells as it is in rows
    By shaan65 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-26-2010, 12:45 AM
  7. Macro to split a single cell data into rows and copying other cells as it is in rows
    By Pankaj Sonawane in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 08-25-2010, 07:09 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