johnnytominaga
New Member
- Joined
- Apr 27, 2018
- Messages
- 19
Hey guys!
Is it possible to run an Advanced Filter that accounts for multiple values under the same criteria?
Here's what I'd like to achieve:
BEFORE:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Phone[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]John[/TD]
[TD]99999999[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Paul[/TD]
[TD]22222222[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Sara[/TD]
[TD]99999999[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Vanessa[/TD]
[TD]11111111[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Andrew[/TD]
[TD]99999999[/TD]
[/TR]
</tbody>[/TABLE]
ADVANCED FILTER CRITERIA:
ID<>1
ID<>3
ID<>4
Phone = 99999999
RESULT:
[TABLE="width: 500"]
<tbody>[TR]
[TD]5[/TD]
[TD]Andrew[/TD]
[TD]99999999[/TD]
[/TR]
</tbody>[/TABLE]
My actual dataset has over 7000 rows and over 30 columns. I'm trying to edit the following code (and multiple formats to add data to Cell B6), but haven't had any success:
Sheet1.Range("$A$1:$C$5").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range('Worksheet'!$A$6:$B$7"), CopyToRange:=Range( _
"'Worksheet'!$A$9:$A$13"), Unique:=False
I'm using Excel 2016 on Windows 10.
Thanks for your help as always,
Johnny
Is it possible to run an Advanced Filter that accounts for multiple values under the same criteria?
Here's what I'd like to achieve:
BEFORE:
[TABLE="width: 500"]
<tbody>[TR]
[TD]ID[/TD]
[TD]Name[/TD]
[TD]Phone[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]John[/TD]
[TD]99999999[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Paul[/TD]
[TD]22222222[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Sara[/TD]
[TD]99999999[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Vanessa[/TD]
[TD]11111111[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Andrew[/TD]
[TD]99999999[/TD]
[/TR]
</tbody>[/TABLE]
ADVANCED FILTER CRITERIA:
ID<>1
ID<>3
ID<>4
Phone = 99999999
RESULT:
[TABLE="width: 500"]
<tbody>[TR]
[TD]5[/TD]
[TD]Andrew[/TD]
[TD]99999999[/TD]
[/TR]
</tbody>[/TABLE]
My actual dataset has over 7000 rows and over 30 columns. I'm trying to edit the following code (and multiple formats to add data to Cell B6), but haven't had any success:
Sheet1.Range("$A$1:$C$5").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range('Worksheet'!$A$6:$B$7"), CopyToRange:=Range( _
"'Worksheet'!$A$9:$A$13"), Unique:=False
I'm using Excel 2016 on Windows 10.
Thanks for your help as always,
Johnny