+ Reply to Thread
Results 1 to 4 of 4

Stacking multiple columns into one with duplication of other columns

  1. #1
    Registered User
    Join Date
    09-13-2018
    Location
    Copenhagen
    MS-Off Ver
    2013
    Posts
    2

    Stacking multiple columns into one with duplication of other columns

    Hi, I have a problem which I have tried to solve for some time but without success. Any help would be greatly appreciated!

    Basically, my problem is that I have several columns which should be merged into one. An example
    Row Column A Column B Column C Column D Column E
    1 wa wc 4 2
    2 wa 3 4
    3 wc wb wa 1 5

    In this example I want 6 rows. The first row should contain column A, D and E (with the column values of wa, 4, 2), second row column B (i.e. wc, 4,2) third row column A again (i.e. wa,3,4) fourth row column A (i.e. wc,1,5), fifth row column B (i.e. wb,1,5) sixth row column C (i.e. wa,1,5).

    I have attached a example of before/after transformation!
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Stacking multiple columns into one with duplication of other columns

    Hi doktor. Welcome to the forum.

    The explanation does not resemble the workbook.

    Also there is no indication of what to do with columns F and G. 'After' reflects changes there as well.
    Dave

  3. #3
    Registered User
    Join Date
    09-13-2018
    Location
    Copenhagen
    MS-Off Ver
    2013
    Posts
    2

    Re: Stacking multiple columns into one with duplication of other columns

    Thanks!
    The F and G are just recopied versions of the before. Meaning that row 8 (in the before) is translated into row 8 and row 9, where column D,E,F,G are exact copies of row 8, but for row 8 and 9 now.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,883

    Re: Stacking multiple columns into one with duplication of other columns

    Hmm, let me see if I understand this.

    Transformation steps...
    1. Filter and remove entire row when D column has "." or Blank
    2. Then If B or C column has value, then insert row below and move value to A column. D:G is copied from original row and pasted to inserted row.
    Repeat step 2 until you clear B & C column.

    Is this right?
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

+ 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. stacking multiple columns into one
    By niktodorov1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-09-2018, 01:18 PM
  2. [SOLVED] Stacking data from multiple columns.
    By paularthur90 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-27-2016, 05:15 AM
  3. Replies: 3
    Last Post: 11-14-2015, 03:48 PM
  4. Replies: 2
    Last Post: 04-09-2014, 03:05 PM
  5. Combining Multiple Columns without stacking
    By ATowne20 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-05-2013, 01:41 PM
  6. Stacking many columns into one
    By pickslides in forum Excel General
    Replies: 2
    Last Post: 01-08-2012, 08:04 PM
  7. Stacking columns across multiple sheets
    By mstinson23 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-28-2009, 03:08 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