I am trying to adjust the row height based on the cell value. The operation have to run through filtered data with around 700 rows.
The code below works, but it take 2-3 minutes to finish the operation, which is way too long.
Is there any chance I can do this without a loop? Or please let me know if there is anything else I should do to shorten the operation time.
Thanks a lot for your help!
Sub rowheight()
Dim hgt As Integer
Dim WorkRng As Range
Application.ScreenUpdating = False
Set WorkRng = Range("AJ6:AJ700")
For Each C In WorkRng.SpecialCells(xlCellTypeVisible)
If C.Value > 0 Then
hgt = C.Value
C.EntireRow.rowheight = hgt
End If
Next C
Application.ScreenUpdating = True
End Sub
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)