# Stacking multiple columns into one with duplication of other columns

1. ## 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!

2. ## 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.

3. ## 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. ## 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?

##### Users Browsing this Thread

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

#### 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