Filter by Criteria hide empty Cells. resize Specific rows

0

Hi Everyone.

I'm very new in Macro World. But i like so much, just can't write jet,

I have three column each has diferent number wich i like to filter and the empty hide.

Example.

ActiveWorkbook.Worksheets("NewSheets").Sort.SortFields.Add Key:=Range("C1")

Column B. 1, 2, 3, 78, 83.

Column C.  1, 2, 3, between empty Hide, 45, 35

After of Filter i have to set the rows diferent size samething like thadt.

 Selection.RowHeight = 25
    Range( _
        "1:5,10:10,17:17,).Select

I try with Macro recording. its work somehow but not happy with dadt..

I hope someone can help me in This Case. BR.

Answer
Discuss

Answers

0

You just need basic AutoFilter macros.

To filter the list:

Sub filter()

Range("B1").AutoFilter Field:=1, Criteria1:=4

End Sub

To remove the filter:

Sub clear_filter()

ActiveSheet.ShowAllData

End Sub

Here is a tutorial of ours on how to use the AutoFilter feature in VBA.

AutoFilter with an Excel Macro

Discuss

Answer the Question

You must create an account to use the forum. Create an Account or Login