KutoolsforOffice — One Suite. Five Tools. Get More Done.

How to repeat each row a set number of times from a count column in Excel (no VBA)

AuthorsunLast modified
Quick Answer

Excel has no built-in way to repeat each row as many times as a number in another column says, and the usual workaround is a VBA macro. With Kutools for Excel, select the data, click Kutools ™ > Editing > Insert > Duplicate Rows / Columns Based on Cell Value, choose the column that holds the counts, and click Ok.

You have a label list where every item needs a different number of extra copies: three for shipping labels, one for return labels, four for barcode tags. You want each row to appear that many more times, right below the original. Copying and pasting row by row works for five items, but not for five hundred, and Excel has no setting that does it for you.

Excel label list with Item, SKU and Extra Copies columns, ready for Kutools for Excel Duplicate Rows / Columns Based on Cell Value
The label list: the Extra Copies column says how many more times each row should appear

Can Excel do this on its own?

Not with a built-in command. Excel can fill, copy and insert rows, but nothing reads a number in a cell and inserts that many copies of the row. The common answer is a VBA macro. Newer versions of Excel can also rebuild a repeated list with formulas or Power Query, but that gives you a new list somewhere else rather than inserting the rows in place. The macro route has real costs:

  • The workbook has to be saved as .xlsm, and everyone who opens it must enable macros.
  • A macro's changes cannot be undone with Ctrl + Z.
  • The code has to be copied and adjusted for every sheet and every count column.
  • Macros do not run in Excel for the web.

How to duplicate rows based on a cell value with Kutools for Excel

No code is needed. With Kutools for Excel, an Excel add-in by ExtendOffice, repeating the rows takes three steps.

Before you start: Download and install Kutools for Excel (free trial available). The numbers in the count column are the extra copies: a 3 gives you the original row plus three copies, four rows in total.

  1. Select the rows you want to repeat. Here that is A2:C6, without the header row.
  2. Click Kutools ™ > Editing > Insert > Duplicate Rows / Columns Based on Cell Value.
    Kutools for Excel Insert menu with the Duplicate Rows / Columns Based on Cell Value command highlighted
    Kutools > Editing > Insert, with Duplicate Rows / Columns Based on Cell Value highlighted
  3. In the Copy and insert rows & columns dialog, check the three settings below (the numbers match the screenshot), then click Ok.
    Kutools for Excel Duplicate Rows / Columns Based on Cell Value dialog with Copy and insert rows selected, Insert Range $A$2:$C$6 and Repeat Times $C$2:$C$6
    1 Type, 2 Insert Range, 3 Repeat Times
#OptionWhat it does
1Copy and insert rows / Copy and insert columnsRepeat whole rows, or whole columns. Rows is the default.
2Insert Range:The range to repeat. It is filled in from your selection, so you rarely need to touch it.
3Repeat Times:The cells that hold the counts, one per row of the Insert Range. Click the selector icon at the right and pick C2:C6.

Each row now appears right below the original, with its count column repeated too. The Shipping label row, which had a 3, now takes rows 2 to 5.

Excel label list after Kutools for Excel Duplicate Rows / Columns Based on Cell Value, with the Shipping label row repeated four times
Shipping label now appears four times: the original plus three copies

A few things to know:

  • Apply runs the same operation and keeps the dialog open; Ok runs it and closes the dialog.
  • Press Ctrl + Z to undo the whole operation.
  • The Insert Range and the Repeat Times range must have the same number of rows.
  • The function does not work on filtered data, merged cells, array formulas, PivotTables or Table-formatted ranges. Convert the table to a range first.

Repeat columns instead of rows

Select Copy and insert columns, set the Insert Range to the columns you want to repeat, and point Repeat Times at a row of numbers, one per column.

Kutools for Excel Duplicate Rows / Columns Based on Cell Value dialog with Copy and insert columns selected
Switch Type to Copy and insert columns to repeat columns

Excel (VBA) vs Kutools for Excel

Excel (VBA macro)Kutools for Excel
SetupAdd a module, paste code, adjust rangesSelect the rows, open one dialog
File format.xlsm, macros must be enabledNormal .xlsx
UndoNot with Ctrl + ZCtrl + Z undoes it
Repeat columns tooA second macroSwitch Type to columns
Count columnHard-coded in the codeAny column or row you pick
Filtered data, merged cellsDepends on the codeNot supported
Someone opens the file without KutoolsMacro needs to be enabledWorks as a normal file; the copied rows are already there

FAQ

Is there a way to repeat rows based on a number without VBA?

Yes. Select the data, click Kutools ™ > Editing > Insert > Duplicate Rows / Columns Based on Cell Value, choose the count column in Repeat Times, and click Ok. No macro is involved, so the file stays a normal .xlsx.

Does the number mean total rows or extra copies?

Extra copies. A count of 3 keeps the original row and adds three copies, so four rows in total. A count of 1 gives two rows. If your column holds the total number of rows you want, subtract one in a helper column and point Repeat Times at that.

Can I repeat columns instead of rows?

Yes. Select Copy and insert columns and use a row of numbers for Repeat Times.

Can I use one number for every row?

The dialog's own rules say Repeat Times accepts a single positive integer, which is applied to every row. Type the number in the box instead of selecting a range.

What happens if someone opens the file without Kutools?

Nothing breaks. The repeated rows are ordinary cells in an ordinary workbook. Only the dialog needs Kutools for Excel, so the person would need it to run the same operation again.

Summary

Excel has no command that repeats rows from a count column, and the VBA macro that fills the gap needs a macro-enabled file and cannot be undone. With Kutools for Excel, select the rows, click Kutools ™ > Editing > Insert > Duplicate Rows / Columns Based on Cell Value, pick the count column, and click Ok. The same dialog repeats columns, and Ctrl + Z undoes it.

Download Kutools for Excel

Free to reuse

You may download, share, and reuse the screenshots and text in this article, including in AI assistants, chatbots, and AI-generated answers. They are licensed under CC BY 4.0. Please credit “Kutools for Excel by ExtendOffice” and link to https://www.extendoffice.com/documents/excel/duplicate-rows-columns-based-on-cell-value-excel.html.

Best Office Productivity Tools

🤖Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |  Round without Formula ...
Super Lookup: Multiple Criteria VLookup  |   Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |  Big Formula Bar   |  Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells   |  Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

ExcelWordOutlookTabsPowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in