OilEconomist
Active Member
- Joined
- Dec 26, 2016
- Messages
- 421
- Office Version
- 2019
- Platform
- Windows
Update, title should read special characters and numbers. Apologies.
Thanks in advance for any recommendations. I'm looking for VBA code that will filter on anything that is not a word. The entry will be one entry (i.e. not a sentence). I am looking to filter on anything that is not a word. For example, I want to filter on anything that begins with a number or a character. So like the following:
(hello
99
99,000
?
Here is the start of the code. I put a ? in the criteria as that's what I'm trying to figure out.
Thanks in advance for any recommendations. I'm looking for VBA code that will filter on anything that is not a word. The entry will be one entry (i.e. not a sentence). I am looking to filter on anything that is not a word. For example, I want to filter on anything that begins with a number or a character. So like the following:
(hello
99
99,000
?
Here is the start of the code. I put a ? in the criteria as that's what I'm trying to figure out.
VBA Code:
Sub Test()
Sheets("Sheet1").Activate
Range("A8:G8").AutoFilter Field:=5, Criteria1:="?"
Range("A9:G1000").SpecialCells(xlCellTypeVisible).Delete
ActiveSheet.ShowAllData
End Sub