AutoFilter Failing

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
3,871
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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

MARK858

MrExcel MVP
Joined
Nov 12, 2010
Messages
14,052
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
3,871
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Perfect!! Thanks Mark, appreciated.
 

MARK858

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

Watch MrExcel Video

Forum statistics

Threads
1,129,800
Messages
5,638,430
Members
417,025
Latest member
MusterDuster

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