Display strings on the right side of cells
When entering a long character string in a cell in Excel
If nothing is entered in the right cell
Like the A1 cell of the image below
Characters are displayed on the right side.
In the image, the same character string is entered from A1 to A3 cell.
Even if nothing is entered in the right cell
Like the A2 cell
Characters may not be displayed on the right side.
This happens in the following cases.
· When cell formatting is checked
"Show folded and show whole"
And
· When the cell height is not automatically adjusted
If the height of the cell is insufficient
The character string will not be displayed
and it will be cut in the middle.
It is a problem because characters are printed out in this state.
The A3 cell is in a state
the height of A2 cell is automatically adjusted.
The character string in that cell is
wrapped and displayed.
You want to display strings on the right side
like the A1 cell of the previous picture.
I will introduce macros that can be used in such cases.
Code here
Sub macro180708a() Dim obj As Object |
Execute the above code in the state of the image below

Result:
I noticed this time writing this article
When "display by folding" is set in the merged cell,
the cell height is adjusted to one line.
So in the above code
I targeted only unmerged cells.
| 固定リンク
この記事へのコメントは終了しました。

コメント