AutoFilter Failing

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,247
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
My autofilter is not doing what I was hoping it would ...

VBA Code:
With ws_rmrsource
        With .Range("A2:A900")
            .NumberFormat = "yy-mmm-dd"     ' optional to set the display format
            .Value = .Value
        End With
        'sc = CDate(inq_date)
        .Range("A1").AutoFilter Field:=1, Criteria1:="<>inq_date"
  End With

I am trying to filter the data in column A of worksheet ws_rmrsource of all values OTHER THAN the value of inq_date. The visible data should expose the rows of data where the value in A = inq_date.

Column A are true dates finally, and inq_date is a serial number of a date.

I don't receive any errors, the column headers have the drop downarrows, and the row leters are blue (indicating filtered data), yet all rows are exposed includibg those equal to inq_date.

Thoughts?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
14,470
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
Try
VBA Code:
Criteria1:="<>" & inq_date
 

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,247
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Perfect!! Thanks Mark, appreciated.
 

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
14,470
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
You're welcome.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,525
Messages
5,837,867
Members
430,519
Latest member
abtg1

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