Article ID: 156841
Article Last Modified on 10/21/2000
APPLIES TO
- Microsoft Excel 97 Standard Edition
This article was previously published under Q156841
SUMMARY
In Microsoft Excel 97, 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.
Also, note that the Help topic for the REPT function contains the following sentence:
The result of the REPT function cannot be longer than 255 characters.
This information is incorrect. The result cannot be longer than 32,767 characters.
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 97 is 32,767 characters.
REFERENCES
For more information about the REPT function, click the Index tab in Microsoft Excel Help, type the following text
rept
and then double-click the selected text to go to the "REPT" topic.
Additional query words: XL97 repeats 8.0
Keywords: KB156841