FryGirl
Well-known Member
- Joined
- Nov 11, 2008
- Messages
- 1,364
- Office Version
- 365
- 2016
- Platform
- Windows
I have downloaded and used a workbook from Contextures.com which works great for condensing the pick from a DV list. Instead of filtering from the beginning of the word, how can this become a wildcard? Example, in the file, if I only wanted to see names that contained the combination "be"? That would only return Bell and Imber.
FL0024 - Shorten Data Validation List
My thought would be to add wildcards, but evidently this approach is not right.
FL0024 - Shorten Data Validation List
My thought would be to add wildcards, but evidently this approach is not right.
VBA Code:
NamesSort ("*" & "CriteriaLetter" & "*")
VBA Code:
Option Explicit
' Developed by Contextures Inc.
' www.contextures.com
Private Sub Worksheet_Change(ByVal Target As Range)
Dim wsSD As Worksheet
Dim wsS As Worksheet
On Error GoTo errHandler
Set wsSD = Sheets("Sales Data")
Set wsS = Sheets("Summary")
Application.EnableEvents = False
Select Case Target.Address
Case wsS.Range("LetterSel").Address
Target.Value = UCase(Target.Value)
wsS.Range("NameSel").ClearContents
NamesSort ("CriteriaLetter")
If Target.Value = "" Then
wsS.Range("ExtractOrders").CurrentRegion.Offset(1, 0).ClearContents
Else
OrderSort ("CriteriaLetter")
End If
Case wsS.Range("NameSel").Address
If Target.Value = "" Then
NamesSort ("CriteriaLetter")
If wsS.Range("LetterSel").Value = "" Then
wsS.Range("ExtractOrders").CurrentRegion.Offset(1, 0).ClearContents
Else
OrderSort ("CriteriaLetter")
End If
Else
OrderSort ("CriteriaName")
End If
Case Else
'do nothing
End Select
exitHandler:
Application.EnableEvents = True
Exit Sub
errHandler:
MsgBox "Could not filter orders"
Resume exitHandler
End Sub