WorksheetFunction.Rept(String, Double) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Repeats text a given number of times. Use REPT to fill a cell with a number of instances of a text string.
public:
System::String ^ Rept(System::String ^ Arg1, double Arg2);
public string Rept (string Arg1, double Arg2);
Public Function Rept (Arg1 As String, Arg2 As Double) As String
Parameters
- Arg1
- String
Text - the text you want to repeat.
- Arg2
- Double
Number_times - a positive number specifying the number of times to repeat text.
Returns
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!.