Excel advanced filter - blank and zero values

Mallesh23

Well-known Member
Joined
Feb 4, 2009
Messages
853
Office Version
  1. 2010
Platform
  1. Windows
Hi Team,

Need your help on advaneced filter.

DSR YTD MAY 2020.xlsx
ABCDEF
1Set1Set2
2Month RegionCompanyAmount
3MAY*SouthABC Limited*<>0
4MAY*NorthABC Limited*blank
5MAY*East
6MAY*West
7
8
9Combine all combination
10Month RegionCompanyAmount
11MAY*SouthABC Limited*<>0
12MAY*NorthABC Limited*blank
13MAY*East
14MAY*West
Sheet1


1) I want May month Data,
2) In Region I want North,South,East,West Data
3) I want all Company Data Irrespective amount Column ,
Except if Company is abc Limited* I dont like to Include 0 value and blank cells{. Negative/Positive Notional is ok.)


How to apply advanced filter for Company header and Amount Column. below is recorded code.

VBA Code:
With Range("a1").CurrentRegion
        AutoFilter Field:=1, Criteria1:="=ABC*", Operator:=xlAnd
        .AutoFilter Field:=2, Criteria1:="=0", Operator:=xlOr, Criteria2:="="
         If .Columns(1).SpecialCells(xlCellTypeVisible).Count > 1 Then
            .Offset(1).SpecialCells(xlCellTypeVisible).EntireRow.Delete
            Sheet2.Cells.AutoFilter
        Else
            Sheet2.Cells.AutoFilter
        End If

Can we club all scenarios in advanced filter. I am only able to apply advanced filter for month and Region.

Thanks
mg
 

Some videos you may like

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Watch MrExcel Video

Forum statistics

Threads
1,127,604
Messages
5,625,755
Members
416,133
Latest member
ToseSenpai

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top