amelia123456
New Member
- Joined
- Apr 15, 2019
- Messages
- 8
I have a few locations, eg. AMK, AMK MRT.
When i type AMK, both amk and amk mrt will appear, how do i filter to exact when i type amk, only amk will appear?
this is my code
Sub Advanced_Filtering()
Range("A8:H1611").AdvancedFilter _
Action:=xlFilterInPlace, _
CriteriaRange:=Range("A1:C2")
End Sub
[TABLE="width: 500"]
<tbody>[TR]
[TD]code[/TD]
[TD]assets[/TD]
[TD]location[/TD]
[TD] filter(this is a button)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]AMK[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Code[/TD]
[TD]date[/TD]
[TD]cost[/TD]
[TD]assets[/TD]
[TD]owner[/TD]
[TD]condition[/TD]
[TD]location[/TD]
[/TR]
[TR]
[TD]12345[/TD]
[TD]12/02/2016[/TD]
[TD]2000[/TD]
[TD]sealing machine[/TD]
[TD]abc[/TD]
[TD]good[/TD]
[TD]Amk[/TD]
[/TR]
[TR]
[TD]22456[/TD]
[TD]10/05/2017[/TD]
[TD]1000[/TD]
[TD]sugar machine[/TD]
[TD]abc[/TD]
[TD]good[/TD]
[TD]Amk Mrt[/TD]
[/TR]
[TR]
[TD]55624[/TD]
[TD]11/04/2018[/TD]
[TD]1800[/TD]
[TD]induction cooker[/TD]
[TD]abc[/TD]
[TD]good[/TD]
[TD]AMK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
When i type AMK, both amk and amk mrt will appear, how do i filter to exact when i type amk, only amk will appear?
this is my code
Sub Advanced_Filtering()
Range("A8:H1611").AdvancedFilter _
Action:=xlFilterInPlace, _
CriteriaRange:=Range("A1:C2")
End Sub
[TABLE="width: 500"]
<tbody>[TR]
[TD]code[/TD]
[TD]assets[/TD]
[TD]location[/TD]
[TD] filter(this is a button)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]AMK[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Code[/TD]
[TD]date[/TD]
[TD]cost[/TD]
[TD]assets[/TD]
[TD]owner[/TD]
[TD]condition[/TD]
[TD]location[/TD]
[/TR]
[TR]
[TD]12345[/TD]
[TD]12/02/2016[/TD]
[TD]2000[/TD]
[TD]sealing machine[/TD]
[TD]abc[/TD]
[TD]good[/TD]
[TD]Amk[/TD]
[/TR]
[TR]
[TD]22456[/TD]
[TD]10/05/2017[/TD]
[TD]1000[/TD]
[TD]sugar machine[/TD]
[TD]abc[/TD]
[TD]good[/TD]
[TD]Amk Mrt[/TD]
[/TR]
[TR]
[TD]55624[/TD]
[TD]11/04/2018[/TD]
[TD]1800[/TD]
[TD]induction cooker[/TD]
[TD]abc[/TD]
[TD]good[/TD]
[TD]AMK[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]