How to filter certain row when column contain certain value using vba?

ke9c

Board Regular
Joined
Jul 27, 2010
Messages
75
How to filter certain row when column contain certain value using vba? i try to manually add in filter using Excel, but it doesnt works, dont know why, anyone know how to write vba code to filter out rows of which some of its columns contain certain value?

Thanks​
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Weaver

Well-known Member
Joined
Sep 10, 2008
Messages
5,196
What's your data range, which column do you need to filter and what are the criteria?
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Simply use the "Macro Recorder" to preform an AutoFilter. It will do most of the work for you, giving you the proper syntax!! THen post that code and we may be able to simplify it or add ways to use variables for you Field and Criteria!!
lenze
 

ke9c

Board Regular
Joined
Jul 27, 2010
Messages
75
Thanks, may i know is there a way i can upload my Excel? i dont see upload attachment in the advanced option. thanks
 

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
54,259
Office Version
  1. 365
Platform
  1. Windows
Thanks, may i know is there a way i can upload my Excel? i dont see upload attachment in the advanced option. thanks
You cannot upload a file to this forum but you can post small screen shots. Here are a few ways:

Excel jeanie
or
RichardSchollar’s beta HTML Maker
or
Borders-Copy-Paste

However, if you had answered the questions you have been asked, or followed the advice given in the responses so far, you would probably have your code working by now. :biggrin:
 
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,163,487
Messages
5,831,981
Members
430,100
Latest member
namhnz

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