AW: Zellen mit bestimmtem Inhalt zeilenweise in eine S
27.06.2017 12:44:51
Michael
Hallo!
Eine Möglichkeit mit VBA:
Sub a()
Const CHECK$ = "Germany"
Dim Wb As Workbook: Set Wb = ThisWorkbook
Dim Ws As Worksheet: Set Ws = Wb.Worksheets("Tabelle1")
Dim a, b, i&, j&, k&
Application.ScreenUpdating = False
a = Ws.Range("D3:F500"): k = 1
ReDim b(1 To UBound(a, 1) * UBound(a, 2))
For i = LBound(a, 1) To UBound(a, 1)
For j = LBound(a, 2) To UBound(a, 2)
If InStr(1, a(i, j), CHECK) Then
b(k) = a(i, j): k = k + 1
End If
Next j
Next i
ReDim Preserve b(1 To k)
For i = 1 To k
Ws.Cells(i + 3, 10) = b(i)
Next i
Set Wb = Nothing
Set Ws = Nothing
Erase a: Erase b
End Sub
Passt?
LG
Michael