If you have multiple numbers to filter in a column and the numbers have no pattern then Excel's Filter Search Box or Number Filters won't be able to accomplish this task. You can use the following VBA Macro for accomplishing that:
Just edit the Range and Values of Array as per ur need:
To understand the syntax you can refer to:
-urShadow
Reference: http://stackoverflow.com/questions/21834701/use-autofilter-on-more-than-2-criteria
Just edit the Range and Values of Array as per ur need:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Excel_AutoFilter_Multiple_Numbers_Using_VBA_Macro() | |
' | |
' Excel AutoFilter Multiple Numbers Using VBA Macro | |
' Purpose: The purpose of this VBA Macro is to Filter Multiple Numbers from a Column | |
' Date: 20160525 | |
' Author: Nauman Khan | |
' Contact: http://naumankhan.blogspot.com | |
' | |
ActiveSheet.Range("$A$1:$A$100").AutoFilter Field:=1, _ | |
Criteria1:=Array("1", "5", "7", "10"), _ | |
Operator:=xlFilterValues | |
End Sub |
To understand the syntax you can refer to:
|
|
|
-urShadow
Reference: http://stackoverflow.com/questions/21834701/use-autofilter-on-more-than-2-criteria
No comments:
Post a Comment