Forum Discussion
REPT function is not working correctly (for me).
- Dec 02, 2023
It has nothing to do with the REPT function, nor with the merged cells or the rotated text.
Although a cell can contain up to 32,767 characters, only up to 1,024 characters will be displayed in the cell.
The text that you repeat has 42 characters, so it will be displayed 1,024/42 ~ 24.4 times.
The issue you are experiencing with the REPT function not repeating the text as expected might be related to the way Excel is handling merged cells with rotated text. When text is rotated, the cell height is limited, and it might not display as many repetitions as expected.
Instead of using the "Merge and Center" with "Rotate Text Up" formatting options, you can achieve a similar visual effect by adjusting the row height manually without merging the cells. Here are the steps:
1. Select the Range:
Select the range of cells where you want the repeated text.
2. Adjust Row Height:
Right-click on the selected cells.
Choose "Row Height."
Set the desired row height that accommodates the repeated text.
3. Enter the REPT Formula:
In the top cell of the selected range, enter the REPT formula.
For example, if you want to repeat the text 50 times:
=REPT("<----- THIS TEST TEXT WILL WORK ----->", 50)
4. Copy Formula Down:
Drag the formula down to fill the desired number of cells.
This way, you manually adjust the row height to allow for the repeated text without using the "Merge and Center" option, which can affect the display of repeated text in rotated cells.
Additionally, if you still encounter issues, consider checking if any conditional formatting or other settings are affecting the display. It's possible that certain formatting options might interfere with the behavior of merged and rotated cells. Using the manual row height adjustment method should provide more control over the visual appearance of the repeated text. The text and steps were edited with the help of AI.
My answers are voluntary and without guarantee!
Hope this will help you.
Was the answer useful? Mark as best response and Like it!
This will help all forum participants.