Hi,
I have this VB code:
Which works great but my problem is that I have a formulas in Column B which makes all the blanks go to the top.
Is there a way I can filter out the blanks straight after the code above when the worksheet is activated?
When I do it manually it's exactly how I want it to be displayed.
Thanks in advance!
I have this VB code:
VBA Code:
'Sort Case Cost
Private Sub Worksheet_Activate()
With Sheets("Case Cost")
On Error Resume Next
ThisWorkbook.Sheets("Case Cost").Range("B1").Sort Key1:=ThisWorkbook.Sheets("Case Cost").Range("B1"), _
Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
On Error GoTo 0
For Each cel In .Range("B1:B100")
Next cel
End With
Application.ScreenUpdating = True
End Sub
Which works great but my problem is that I have a formulas in Column B which makes all the blanks go to the top.
Is there a way I can filter out the blanks straight after the code above when the worksheet is activated?
When I do it manually it's exactly how I want it to be displayed.
Thanks in advance!