Does this work for your needs ?
Code
Option Explicit
Sub autoFitRows()
If WorksheetFunction.CountA(Range("A1:A100")) = 0 Then
'If ActiveSheet.Columns(1) Is Nothing Then
MsgBox " No cells found"
Exit Sub
End If
With ActiveSheet.UsedRange
.EntireRow.AutoFit
'On Error Resume Next
With .Columns(1).SpecialCells(xlConstants)
'On Error GoTo 0
If Not .Columns(1) Is Nothing Then
.RowHeight = .RowHeight + 5
End If
End With
End With
End Sub
Display More