다음을 통해 공유


WorksheetFunction.Rept Method (Excel)

Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string.

Syntax

.Rept(Arg1, Arg2)

A variable that represents a WorksheetFunction object.

Parameters

Name

Required/Optional

Data Type

Description

Arg1

필수

String

Text - the text you want to repeat.

Arg2

필수

Double

Number_times - a positive number specifying the number of times to repeat text.

Return Value

String

Remarks

  • If number_times is 0 (zero), REPT returns "" (empty text).

  • If number_times is not an integer, it is truncated.

  • The result of the REPT function cannot be longer than 32,767 characters, or REPT returns #VALUE!.

참고 항목

개념

WorksheetFunction Object

WorksheetFunction Object Members