Spreadsheet formulas explained, side by side

REPT Function in Excel, Google Sheets, Airtable & Notion

REPT repeats a piece of text a given number of times. REPT("★", 4) is “★★★★”.

Syntax in each app

AppSupportSyntax & notes
Excel✔ Built inREPT(text, number_times)
Google Sheets✔ Built inREPT(text_to_repeat, number_of_repetitions)
Airtable✔ Built inREPT(string, number)
Notion✔ Built inrepeat(text, times)
For padding, Notion also has padStart(text, length, pad) and padEnd().
Try REPT with your own values
Result (as Excel & Google Sheets return it)
★★★★ 4 characters
Your formula, ready to paste
Excel=REPT("★", 4) open excel.new ↗
Google Sheets=REPT("★", 4) open sheets.new ↗
AirtableREPT("★", 4)
Notionrepeat("★", 4)

Arguments

ArgumentWhat it means
textThe text to repeat.
number_timesHow many times. Decimals are truncated; 0 gives empty text; negative is #VALUE!.

Examples

FormulaResultWhyCopy
=REPT("★", 4)★★★★
=REPT("★", B2)&REPT("☆", 5-B2)★★★☆☆A 5-star rating with 3 in B2.
=REPT("|", B2/10)In-cell barA quick bar chart; decimals are truncated.
=REPT("0", 6-LEN(A2))&A2000042Pad 42 in A2 to six digits. TEXT(A2, "000000") also works.

Examples use Excel / Google Sheets syntax unless noted.

How REPT works

REPT is mostly used for visual tricks: in-cell bar charts (=REPT("█", B2/MAX(B$2:B$20)*20)), star ratings, progress bars and dotted leaders. It is also a simple way to pad codes to a fixed width: =REPT("0", 6-LEN(A2))&A2 turns 42 into “000042”.

The repeat count is truncated, not rounded, so 3.9 repeats three times. A negative count returns #VALUE!, which happens easily in padding formulas when the value is already longer than the target. Guard with MAX(0, …). Results longer than 32,767 characters also fail.

Airtable's REPT and Notion's repeat() behave the same. Notion's progress bars are often built with repeat("●", round(prop("Progress") * 10)). For padding, Notion's padStart(text, 6, "0") is simpler than REPT.

Frequently Asked Questions

How do I make a bar chart inside a cell?
Repeat a block character in proportion to the value: =REPT("█", ROUND(B2/MAX(B$2:B$20)*20, 0)), then use a monospaced font.

Part of the Text functions. Results in the tester follow Excel and Google Sheets behaviour; always double-check important work in your own file.