Unstack and Restack Data in Excel
QI Macros Makes it Easy to Stack & Unstack Data in Excel
You can find the restacking tools in the Data Mining and Analysis section of the QI Macros menu
NOTE: The Unstack/Restack tool does not process zeros.
If you wish to include zeros in your unstacked/restacked data , the workaround is to find and replace all zeros with an arbitrary number (e.g. 99), before performing the unstack/restack:
Ctrl + F > 0 > Find All > Replace with: 99 > Replace All. Once you have done so, "Replace All" again and change the 99 back to 0.
Unstack by Labels takes any size table and unstacks it based on the labels in column A.
Original data (Labels in Column A, Data in Column B)
unstacked into D1:E5 (by Region 1 and 2)
Another way to do this is to unstack by subgroup size. Using any number of columns, Unstack by Subgroups will use the number of samples per subgroup (in this case 4) and unstack the data.
Sometimes you need to stack columns of data. By specifying the number of columns to stack, the QI Macros will take the S1:S2 data above and transform it back into a single column (leaving the side-by-side data as well:
Stack and Restack takes any size table and switches the data from one size table to a new size.
Original data (6X6)
Resulting data (3X12)