I want to filter a list of industries by using their industry code (e.g. C10.3, H53.1 etc.)as criteria. At the end, I want my sheet just showing those industries.
The data I want to filter is in Tabelle1 Column 21. Furthermore, I have stated my industry codes on Tabelle3 Column B. However, the following code does not execute.
Does anyone know why and how I can adjust it to my needs?
Sub Autofilter()
Dim Bereich As Range
Dim IndustryCode As Variant
Set Bereich = Tabelle1.UsedRange
IndustryCode = Tabelle3.Range("B:B").Value2
Bereich.Autofilter Field:=21, Criteria1:="=" & IndustryCode
End Sub