VBABEGINER

Well-known Member
Joined
Jun 15, 2011
Messages
1,232
Below, my filter is not applied...it giving me an error..

Run time error 1004
AutoFilter method of Range class failed

Pls suggest..

Code:
    Range("A5").Select
    ActiveWindow.FreezePanes = False
    
    Range("A4").Select
    Selection.AutoFilter
    
    Range("AF4").Select
    ActiveSheet.Range(Cells(4, 32), Cells(LstRw5, 32)).AutoFilter Field:=32, Criteria1:=nm
 
Last edited by a moderator:

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Re: Need help on filter

Code:
Range("AF4", Cells(Rows.Count, "AF")).AutoFilter Field:=[U]1[/U], Criteria1:=nm

Field is referenced to the first column of the autofilter range.
 
Last edited:
Upvote 0
Re: Need help on filter

Code:
Range("AF4", Cells(Rows.Count, "AF")).AutoFilter Field:=[U]1[/U], Criteria1:=nm

Field is referenced to the first column of the autofilter range.

Hey Hi, SHG...Sorry for pop-upd again...
but the filter is not working on Col AF i.e. 32 number Column..
I want to filter on AF values..

Pls suggest..
 
Upvote 0
It works in Texas, exactly as written. What column is it filtering for you?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,025
Messages
6,122,734
Members
449,094
Latest member
dsharae57

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
Back
Top