1. Home
  2. Functions
  3. Text
  4. REPT

REPT function

Repeats text a given number of times.

Syntax

=REPT(text, number_times)

Arguments

ArgumentRequiredDescription
textRequiredThe text to repeat
number_timesRequiredHow many times to repeat it

How to use REPT

REPT takes 2 required arguments. Type =REPT( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.

Examples

Each result below was calculated by the SheetsBat formula engine.

=REPT("*-", 3)Result "*-*-*-"
=REPT("-", 0)Result "" (empty text)

Every formula, right in your browser

SheetsBat calculates 536 functions, with charts, pivot tables and live collaboration. Free to start.