REPT Function in Google Sheets: Examples, Pitfalls & Compatibility
REPT in Google Sheets: repeat a text unit to build a short display bar, separator or padded label. Includes worked examples and application-specific cautions.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Google Sheets. How formula examples are checked
Quick answer: Use REPT in Google Sheets to repeat a text unit to build a short display bar, separator or padded label. The official REPT reference is the source for the function definition and platform-specific rules described below.
Syntax and arguments
=REPT(text_to_repeat, number_of_repetitions)
text_to_repeat (required): The exact text unit, including any intended separator.
number_of_repetitions (required): A nonnegative repeat count. Prefer an explicitly validated whole number.
Examples use English function names, comma argument separators and decimal points. Adapt formula separators to your workbook settings, not punctuation inside quoted text.
When to use it
Use REPT for a compact visual cue or controlled text padding. Keep the original numeric value visible as well: a bar is a presentation aid, not a replacement for the data. Long repeated strings make worksheets difficult to use.
Three worked examples
Each example is independent. Where input cells are listed, enter those values first; otherwise the formula is self-contained. Expected outputs are independently checked calculations or documented error expectations, not captured results from Google Sheets.
Example 1: Make a three-unit indicator
=REPT("#",3)
Expected result: "###" (quoted here to make spaces and text boundaries visible).
Each hash sign represents one display unit according to the scale you define.
Example 2: Repeat a spaced label
=REPT("go ",2)
Expected result: "go go " (quoted here to make spaces and text boundaries visible).
Spaces only appear because the repeated text includes one.
Example 3: Check the length of a repeated pattern
=LEN(REPT("ab",4))
Expected result: 8.
Four copies of a two-character unit produce eight characters. This checks the display length independently of the visible pattern.
Put it to work safely
Set a documented display scale and maximum count before generating bars. A count of five should mean the same thing throughout the column. Include a separator inside the repeated text when needed; REPT does not add spaces for you. Avoid hiding materially different quantities behind the same clipped bar without also displaying the actual values.
Common mistakes and fixes
Repeated words run together. The text unit is repeated exactly. Add a space inside the quoted text when separation is required.
A zero count seems to have deleted the result. Zero repetitions produce empty text, not a numerical zero. A cell with a formula returning empty text is not necessarily a truly empty cell.
A large count fails or makes the sheet unwieldy. Validate counts and keep display strings short. The application-specific length rules should not be assumed identical.
Google Sheets-specific notes
Google warns about a 32,000-character repetition limit in its REPT help. The wording is not a substitute for testing an extreme output in the current application. This guide uses short integer counts and makes no claim that Excel and Sheets have identical maximum string lengths. See the vendor reference for the current definition.
Excel and Google Sheets comparison
Small, nonnegative whole-number examples are suitable comparison cases. Result-length ceilings and fractional or invalid counts must be checked separately when exporting a workbook.
Compare the REPT guide for Microsoft Excel and its official documentation. Having a guide in both libraries establishes two documented references, not a certificate of identical behavior across releases, locales or file conversions.
Related guides
LEN, LEFT, TEXT, IF · All Google Sheets functions.
Evidence and testing scope
Editorial verification: Official references retrieved on 2026-10-12. The three worked cases are included in this release’s reproducible Python checking suite. It checks the stated arithmetic, calendar or text model and the expected documented error classification; it is not the Google Sheets calculation engine. No native application run, UI screenshot, maximum-size benchmark or cross-version certification is claimed. Review the editorial testing standards before relying on a formula in a critical workbook.