Jul 12 2021 08:13 AM
I am looking to see if it is possible to automatically get Excel to adjust the row hieght in cells depending on the text that is in it.
The issue I have is that if a cell has a lot of text in it the text rolls off the bottom and is not visible.
I Know you can manually click to expand the row height, but is it possible for something to be set to adjust automatically ?
Thanks
Glen
Jul 12 2021 09:46 AM
SolutionIf apply Wrap text is shall work
Jul 12 2021 10:26 AM
As Mr. Baklan already informed you, with wrap text you can manage the line break.
Here is additional information:
Microsoft Link: Wrap text in a cell
VBA:
Sub wrap()
With Range("B9")
.Value = Replace(.Value, ";", vbLf)
.Value = Replace(.Value, vbLf & " ", vbLf)
.EntireRow.AutoFit
End With
End Sub
In composite cells it is not possible to have the row height or width determined automatically.
If you want to wrap text in merged cells, you have to do it differently.
If so, please let me know to show the way.
Nikolino
I know I don't know anything (Socrates)
Jul 13 2021 01:22 AM
@NikolinoDE - Many thanks for getting back to me with this advice - I really appreciate it.
Jul 13 2021 01:22 AM
Jul 13 2021 01:43 AM
I am pleased that you have received the proposed solution from MR. Baklan helped.
I added only the steps.
I wish you continued success with Excel.