If you want to prevent "Wrap Text" and changing row height is not your option, then VBA is quite a flexible solution.
Go to the sheet module first. Click on a sheet where you need to prevent words wrap, right click on it, select "View code".
Depending on your needs, you may disable Text Wrap:
a) entirely on the sheet:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
Cells.WrapText = False
Application.ScreenUpdating = True
Target.Activate
End Sub
b) for specific column(s).
Here is a code that disable Text wrap in column "K":
If Target.Column = Range("K1").Column Then
Application.ScreenUpdating = False
Target.WrapText = False
Application.ScreenUpdating = True
Target.Activate
End If
c) for specific row(s).
Below, Text wrap is disabled for row 10:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.row = 10 Then
Application.ScreenUpdating = False
Target.WrapText = False
Application.ScreenUpdating = True
Target.Activate
End If
End Sub
d) for a range.
In this example, that range is "B30:D100":
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B30:D100")) Is Nothing Then
Application.ScreenUpdating = False
Target.WrapText = False
Application.ScreenUpdating = True
Target.Activate
End If
End Sub
Changing Application.ScreenUpdating
from True
to False
in alignment with Target.Activate
make you stick to the cell you work with. Otherwise, the window will flicker because Excel enables wrapping by default, and then disables it after executing the code from the sheet module. This little trick helps stay focused.