Row Height changes after filtering

Jennifer Thomas 1 Reputation point
2022-01-28T17:01:13.007+00:00

Environment:
Excel Office 365 running in client on Windows 10
The worksheet has all columns set to Wrap Text so column width is retained.

Problem Description:

I show all and auto fit rows - everything looks fine.

Then I filter, and the rows no longer auto-fit; instead, the row height remains as it was when the list was unfiltered.

Question:
The rows are not the same height; how can I autofit again automatically after filtering?

Note: The filters are triggered by a macro, so potentially adding a line of code to that would be acceptable. Example:

Private Sub iManage_Click()
On Error Resume Next
ActiveSheet.ShowAllData
On Error GoTo 0

Range("A1").AutoFilter Field:=6, Criteria1:="*Imanage*"

Range("A1:Z1000").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlYes

Range("A2").Select

End Sub

I can provide a sample but do not see how to do that at this point - if you need one, please say how to upload it.

Thanks!

Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,686 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Abdel Gonzalez 0 Reputation points
    2023-08-29T15:53:13.8433333+00:00

    This was driving me nuts but the clue was in the previous post: the macro. It just does something with the row height that I can't explain. The fix however was to embed code to resize the row height like I wanted.

    For example:

        Rows("61:61").RowHeight = 54.6
    
    0 comments No comments