With Ultimate Suite for Excel

How to Transpose by Key Columns

Transpose by Key Columns is an add-in for Microsoft Excel created to transpose data in the selected range by the chosen key columns and simultaneously combine rows if needed.

The add-in searches for duplicates in key columns. If duplicate values are found, the tool transposes and/or merges data according to the options you choose.

For example:

Transpose table by key columns.

Before you start

Please note the following:

  • The add-in will copy all the visible cells of the selected range to the new sheet and then process them according to the options you pick.
  • To avoid considering empty cells as duplicates, tick Skip empty cells on Step 2 and Step 4.
  • The tool inserts value results, not formulas.

Start Transpose by Key Columns

On the Ablebits Tools tab, in the Transform group, click the Transpose by Key Columns icon:

Start Transpose by Key Columns for Excel.

Step 1: Select your table

On the first step, the add-in picks the entire range with your data:
Select your table to transpose.

  • To expand the selection into the current table or select a different range, choose the corresponding icon on the right side of the Select your table box.
  • You can also select the records right in the worksheet, the add-in will pick up your selection.
  • Another option is to type the range address in the Select your table field manually.
Note. If your data is formatted as a table, the add-in will always get the entire table.
Note. The add-in copies and pastes only visible cells to the new sheet.

Click Next.

Step 2: Choose key columns

On this step, you can see a list of the columns your range contains:

Select key columns.

Pick one or more key columns—the columns which contain duplicate values. Data will be transposed and merged according to the repeated values in the key column(s):

Select key columns with duplicates.

If you select more than one column, a record will be considered duplicate if values in all the selected key columns are the same.

  • If you have header rows, tick off the My table has 1 header row checkbox at the top and change the number of header rows if necessary. If you do not have labels, look at 1st row content to understand what kind of data the columns contain.
  • Select the Skip empty cells option if you have blanks in your key columns. Clear the checkbox to consider blank values as duplicates.
  • Take advantage of the Select All and Unselect All buttons if you have a long list of columns.
Tip. If you have a lot of columns in your table, you can expand the dialogue box window by dragging the bottom right corner down and to the right until you get a suitable size.

Click the Next button.

Step 3: Select columns to transpose (optionally)

On this step, tick off the columns to transpose:
Select columns to transpose.

For example:

Pick columns with the values to transpose.

  • Check the Remove duplicates box to avoid including duplicate values into the transposed table.
  • Tick the Skip empty cells option if you don't want blank cells to be processed as duplicates.
  • Take advantage of the Select All and Unselect All buttons if you have a long list of columns.
Note. If you do not check any columns on this step, only the first occurrences of duplicates in key columns will be preserved in the result table.

Click Next.

Step 4: Pick columns with the values to merge (optionally)

On this step, you can select the columns with the entries to merge:
Pick columns with the values to merge.

For example:
Merged values.

  • Check Delete duplicate values if the records you need to combine may contain identical items but you want to keep only unique values in your results.
  • Select the Skip empty cells option to avoid considering empty cells as duplicates.
  • To use the same delimiter in each column, click the Choose delimiter drop-down list at the top. You can either enter your own separator or select one from the predefined options. Standard delimiters include a semicolon, comma, period, space, and a line break. Besides, you can select one of the following aggregate functions: AVERAGE, COUNT, COUNTA, MAX, MIN, PRODUCT, STDEV.P, STDEV.S, or SUM:
    Select delimiters for merged values. Choose aggregate functions.

    Note. The tool uses the same calculation algorithm as the standard Excel functions (SUM, AVERAGE, COUNT, COUNTA, MAX, MIN, PRODUCT, STDEV.P, STDEV.S), so if you are new to this topic, please consult a corresponding section here.
  • If you wish to have different delimiters for each column, enter or select the needed ones in the Delimiter box next to the column name:
    Choose a different delimiter for each column.
Tip. If you need to change your settings on the previous steps, click the Back button and make the necessary corrections.

Click Finish to get the result transposed table on the new sheet:
Transpose by Key Columns for Excel

Responses

Hi. How can I reverse the process? I mean, from your example I have the "Result" and I want the "Table 1".

Xitshembiso Mabunda says:
November 23, 2022 at 10:59 pm

Hi,

After transposing the data by Key Columns, I then want to create a relationship or a link between the data should I make changes from the original or source table, the transposed has to change also. How do I achieve that?

it does not work properly. i have a large amount data with above 4000 rows and 4 columns. after a specific row (different in other worksheets) the add-in only transform the first row in duplicated key columns. please fix it. for example we have a table that it has two rows with key column "alfa", three rows with key column "beta", three rows with key column "gamma" and two rows with key column "theta" ; the add-in transform correctly two and three rows with key column "alfa" and "beta" after that it transforms only the first row with key column "gamma" and the first row with key column "theta".

Post a comment

Seen by everyone, do not publish license keys and sensitive personal info!

If you have any questions or issues with this add-in, please feel free to post your concerns in the comments area. As soon as we answer, a notification message will be sent to your e-mail. If you do not want to share your thoughts in public, please contact us at support@ablebits.com.