Microsoft KB Archive/181705

= XL98: REPT Function Is Limited to 32,767 Characters =

Article ID: 181705

Article Last Modified on 9/11/2002

-

APPLIES TO


 * Microsoft Excel 98 for Macintosh

-



This article was previously published under Q181705



SUMMARY
In Microsoft Excel 98 Macintosh Edition, the REPT function can return a string with a maximum length of 32,767 characters. If the length of the string that is returned by the REPT function exceeds 32,767 characters, the function returns a #VALUE! error.



MORE INFORMATION
In Microsoft Excel, the REPT function allows you to fill a cell with a sequence of characters that is repeated a specific number of times. For example, sample formulas that use the REPT function are listed in the following table.   Formula              Result

=REPT("x",15)       xxxxxxxxxxxxxxx =REPT("dog",3)      dogdogdog =REPT("y",32768)    #VALUE! =REPT("cat",11111)  #VALUE!

Note that the third formula in the table returns a #VALUE! error because the length of the string that is returned by the function is 32,768 characters long.

The fourth formula in the table returns a #VALUE! error because the length of the string that is returned by the function is 33,333 (11111*3) characters long.

NOTE: The maximum number of characters that a single cell can contain in Microsoft Excel 98 Macintosh Edition is 32,767 characters.

