Dear Excel Experts
I adapted a conditional formatting Macro for my purposes. It works now with an inputbox quite neatly and highlights the cells where the keyword is found.
However, I want to hide the other rows where the keyword isn't in. I don't know if that's even possible with this code... see below
Dictionary for my german words
Abfrage... query
suche... search
Schlüsselwort... keyword
Schlagwort... keyword
Thanks for helping a beginner out
I adapted a conditional formatting Macro for my purposes. It works now with an inputbox quite neatly and highlights the cells where the keyword is found.
However, I want to hide the other rows where the keyword isn't in. I don't know if that's even possible with this code... see below
Dictionary for my german words
Abfrage... query
suche... search
Schlüsselwort... keyword
Schlagwort... keyword
Thanks for helping a beginner out
Code:
Sub Abfrage()
Dim sucheString As String
ActiveWindow.Panes(1).Activate
Range("Tabelle1[[Schlagwort 1]:[Schlagwort 6]]").Select
sucheString = InputBox("Schlüsselwort?")
Selection.FormatConditions.Add Type:=xlTextString, String:=sucheString, TextOperator:=xlContains
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Font
.Color = -16383844
.TintAndShade = 0
End With
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
.Color = 13551615
.TintAndShade = 0
End With
Selection.FormatConditions(1).StopIfTrue = False
End Sub