Quickly duplicate rows or columns based on cell value in a specific column or row in Excel
Kutools for Excel
Boosts Excel With 300+
Powerful Features
Normally, may be there is no good and quick way for you to duplicate each row or column of a specific range n times except the VBA code in Excel. But with the Duplicate Rows / Columns based on cell value utility of Kutools for Excel, you can quickly get it done with only several clicks.
Duplicate rows based on cell value in column
Duplicate columns based on cell value in row
Duplicate rows or columns by typing repeat times
Click Kutools > Insert > Duplicate Rows / Columns based on cell value to enable the utility.
Duplicate rows based on cell value in column
Supposing you have a range of data as the below screenshot shown, now, to duplicate each row a number of times based on the numeric values in column F, please do as follows.
1. Click Kutools > Insert > Duplicate Rows / Columns based on cell value. See screenshot:
2. In the Copy and insert rows & columns dialog, you need to:
- Select the Copy and insert rows option in the Type section;
- Select the range you will duplicate the rows in the Insert Range box;
- Select the column range that you want to duplicate rows based on in the Repeat Times box;
- Click the OK or Apply button. See screenshot:
Note: You can click the Example section to expand the dialog for more example details of the steps.
Then the rows are duplicated as the below screenshot shown.
Demo:
Duplicate columns based on cell value in row
This utility also can help to duplicate each column a number of times based on the numeric values in a specific row.
1. Click Kutools > Insert > Duplicate Rows / Columns based on cell value to enable the utility.
2. In the Copy and insert rows & columns dialog, you need to:
- Select the Copy and insert columns option in the Type section;
- Select the range you will duplicate the columns in the Insert Range box;
- Select the row range that you want to duplicate columns based on in the Repeat Times box;
- Click the OK or Apply button. See screenshot:
Note: You can click the Example section to expand the dialog for more example details of the steps.
Then the selected columns are duplicate as the below screenshot shown.
Demo:
Duplicate rows or columns by typing repeat times
If you have few columns or rows to be copied and you don't want to add a helpler column or row with duplicate times, you can just type the times in the Repeat Times text box. Please do as follows:
1. Click Kutools > Insert > Duplicate Rows / Columns based on cell value to enable the utility.
2. In the Copy and insert rows & columns dialog, you need to:
- Select the Copy and insert rows or Copy and insert columns option in the Type section. Here I selected Copy and insert rows as an example;
- Select the range you will duplicate the rows in the Insert Range box;
- Type non-negative integers that represent repeat times in the Repeat Times box:
- Type a single positive integer, say 3. It means you will copy and insert each row of the Insert Range for 3 times;
- Type non-negative integers for each row with semicolons as seperators. For example, you have selected the range $B$3:$E$6 in the Insert Range box, to copy and insert the 1st, 2nd, 3rd and 4th rows of the range for a, b, c and d times respectively, you can just type a;b;c;d in the Repeat Times box. Note that the number 0 indicates no repetition.
- Click the OK or Apply button. See screenshot:
Note: The number of the non-negative integers in the Insert Range box must be the same as the number of rows or columns of the Insert Range.
Then the selected rows or columns will be duplicated as below screenshot shown.
Kutools for Excel includes more than 300 handy Excel tools. Free to try with no limitation in 30 days. Download the free trial now!
The following tools can greatly save your time and money, which one is right for you?
Office Tab: Using handy tabs in your Office, as the way of Chrome, Firefox and New Internet Explorer.
Kutools for Excel: More than 300 Advanced Functions for Excel 2021, 2019, 2016, 2013, 2010, 2007 and Office 365.
Kutools for Excel
The functionality described above is just one of 300 powerful functions of Kutools for Excel.
Designed for Excel(Office) 2021, 2019, 2016, 2013, 2010, 2007 and Office 365. Free download and use for 30 days.