Hi Experts,
I have figured it out and have codes for Sorting and to hide rows having zero value.
I now need help in combining both codes please..... tried a lot but it will not work....
First auto sort..... It works fine....
ActiveWorkbook.Worksheets("Sheet2").Sort.SortFields.Add Key:=Range("C4:C20") _
, SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Sheet2").Sort
.SetRange Range("A3:K20")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
To hide rows having Zero value..... It works fine...
Sub Hide_rows()
Dim LastRow As Long
Dim Rng As Range
LastRow = Range("A3:K190").End(xlUp).Row '
Set Rng = Range("A3:K190" & LastRow) '
Application.ScreenUpdating = False
For Each cell In Rng
If cell.Value = "0" Then
cell.EntireRow.Hidden = True
End If
Next cell
Application.ScreenUpdating = True
End Sub
Many thanks in advance.....
Regards
Bookmarks