logo
search
Function Problems

How to Fill Excel Cells with Repeated Text Using SEQUENCE

Guest WriterGuest Writer Oct 12, 2026 871 views

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.

How to Fill Excel Cells with Repeated Text 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.
Before you start

Ensure you are using a version of your spreadsheet software that supports Dynamic Array formulas, as older versions may not recognize the SEQUENCE function.

Solution 1Recommended

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.

1
Prepare your input cells

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.

2
Enter the dynamic array formula

Select the empty cell where you want your list to start and type the formula: =IF(SEQUENCE(D3,1,1,1),C3)

3
Generate the repeated text

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 IF Function Combined with SEQUENCE
Dynamic Updates: If you change the number in cell D3 later, the spilled array will automatically expand or shrink without needing to copy or drag the formula.
Advanced Spreadsheet Management

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. 1. Open your workbook in WPS: Launch WPS Office and open your existing spreadsheet or create a new one.
  2. 2. Define your variables: Type the text you want to repeat in one cell, and the desired repetition count in another.
  3. 3. Apply the array formula: Enter =IF(SEQUENCE(count_cell,1,1,1), text_cell) into your target starting cell.
  4. 4. Press Enter to spill results: Hit Enter to instantly generate the dynamic column of repeated text without dragging the fill handle.
Fully compatible with Microsoft Excel formulas and file formats (.xlsx, .xls)Native support for dynamic array functions like SEQUENCE and FILTERLightweight installation with a user-friendly, familiar interfaceFree to download and use for everyday data management tasks
microsoft office alternative - wps office

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.