Excelpromax123
Board Regular
- Joined
- Sep 2, 2021
- Messages
- 167
- Office Version
- 2010
- Platform
- Windows
Hello everyone. I need 1 paragraph to customize line height by total characters. If total characters <=5 then Row height = 15, Otherwise Row height = 30 ( Condition zone B3:B100 ).
I have written the below code but it runs very slow. Thanks everyone to fix it to run faster
Thank you!
I have written the below code but it runs very slow. Thanks everyone to fix it to run faster
Thank you!
VBA Code:
Sub code()
Dim I As Long
Application.ScreenUpdating = False
For I = 3 To 100
If Len(Range("b" & I).Value) <= 5 Then
Rows(I).RowHeight = 14
Else
Rows(I).RowHeight = 30
End If
Application.ScreenUpdating = True
Next I
End Sub