How to Fill Excel Cells with Repeated Text Using SEQUENCE
Question details
The user wants to fill a column with a predefined text string repeated a specific number of times based on an input cell count, using the SEQUENCE function.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Generating a dynamic vertical list of repeated text values based on a variable numeric input.
- Observed behavior
- The SEQUENCE function natively generates a numeric sequence (e.g., 1, 2, 3), but combining it with logic functions allows it to output text like "ABCD" repeatedly.
Ensure you are using a version of your spreadsheet software that supports Dynamic Array formulas, as older versions may not recognize the SEQUENCE function.
Use the IF Function Combined with SEQUENCE
This is the most straightforward method. It uses the IF function to evaluate the array generated by SEQUENCE and replaces every number with your target text.
By nesting SEQUENCE inside an IF function, you force the spreadsheet to evaluate a condition for every row the sequence generates. Since any non-zero number is treated as TRUE in Excel logic, the IF function will return your specified text for every generated row.
Enter the text you want to repeat (e.g., "ABCD") into cell C3. Enter the number of times you want it to repeat (e.g., 10) into cell D3.
Select the empty cell where you want your list to start and type the formula: =IF(SEQUENCE(D3,1,1,1),C3)
Press Enter. The formula will automatically spill down the column, repeating the text from C3 for the exact number of rows specified in D3.

Use the SUBSTITUTE Function with SEQUENCE
An alternative method that generates an array of identical numbers and substitutes them with your desired text.
Dynamically Manage Arrays and Text with WPS Spreadsheet
WPS Spreadsheet offers comprehensive support for modern dynamic array formulas, including SEQUENCE, IF, and SUBSTITUTE. This enables you to seamlessly manage complex data requirements, automate text repetition, and handle dynamic lists without manual dragging.
- 1. Open your workbook in WPS: Launch WPS Office and open your existing spreadsheet or create a new one.
- 2. Define your variables: Type the text you want to repeat in one cell, and the desired repetition count in another.
- 3. Apply the array formula: Enter =IF(SEQUENCE(count_cell,1,1,1), text_cell) into your target starting cell.
- 4. Press Enter to spill results: Hit Enter to instantly generate the dynamic column of repeated text without dragging the fill handle.

Frequently Asked Questions
Why is my SEQUENCE formula returning a #NAME? error?
The #NAME? error usually means your version of the spreadsheet software does not support dynamic arrays or the SEQUENCE function. You will need to upgrade to a newer version, such as Office 365 or the latest WPS Office.
How do I fix a #SPILL! error when repeating text?
A #SPILL! error occurs when the dynamic array formula does not have enough blank cells below it to display all the generated results. Clear the data from the cells directly underneath your formula to allow it to expand properly.
Can I use the REPT function instead of SEQUENCE to fill cells?
The REPT function is designed to repeat text multiple times inside a single cell (e.g., "ABCDABCDABCD"), whereas combining IF and SEQUENCE distributes the repeated text vertically across multiple individual cells in a column.
Can I repeat the text horizontally across a row instead of a column?
Yes. To spill the text horizontally, simply adjust the row and column arguments in the SEQUENCE function. For example, use =IF(SEQUENCE(1, D3, 1, 1), C3) where D3 is the number of columns you want to fill.




