Sub TTNR_einfügen()
Dim MeinArr As Variant, Dic As Object
Dim i As Long
Application.ScreenUpdating = False
With Worksheets("Auszug Log-Report")
MeinArr = .Range("A1:B" & .Range("B65536").End(xlUp).Row).Value
End With
Set Dic = CreateObject("Scripting.Dictionary")
For i = LBound(MeinArr, 1) To UBound(MeinArr, 1)
Dic(MeinArr(i, 2)) = MeinArr(i, 1)
Next
With Worksheets("A")
MeinArr = .Range("A1:B" & .Range("B65536").End(xlUp).Row).Value
End With
For i = LBound(MeinArr, 1) To UBound(MeinArr, 1)
If Dic.Exists(MeinArr(i, 2)) Then
MeinArr(i, 1) = Dic(MeinArr(i, 2))
End If
Next
With Worksheets("A")
.Range("A1").Resize(UBound(MeinArr, 1), UBound(MeinArr, 2)).Value = MeinArr
End With
Application.ScreenUpdating = True
Dic.RemoveAll
Set Dic = Nothing
End SubSub x()
Dim i As Long, arIn As Variant, j As Long, arOut As Variant
Dim objDic As Object
arIn = Range("A1").CurrentRegion
ReDim arOut(1 To UBound(arIn), 1 To 2)
arOut(1, 1) = arIn(1, 1)
arOut(1, 2) = arIn(1, 2)
Set objDic = CreateObject("scripting.dictionary")
For i = 2 To UBound(arIn)
If arIn(i, 2) = 1 Then objDic(arIn(i, 1)) = 1
Next
j = 1
For i = 2 To UBound(arIn)
If objDic.Exists(arIn(i, 1)) Then
j = j + 1
arOut(j, 1) = arIn(i, 1)
arOut(j, 2) = arIn(i, 2)
End If
Next
Range("D1:E1").Resize(j) = arOut
objDic.RemoveAll
Set objDic = Nothing
End Sub
Makro Excel Zeile löschen mit bestimmten wert in Spalte
slimer 12.09.2007 - 78 Hits - 1 Antwort
Excel, Zeilen beim Autostart automatisch über einen Wert in einer Spalte löschen
torsten110 09.11.2007 - 109 Hits - 4 Antworten
Excel VBA: Datei speichern, Excel beenden und Windows herunterfahren
snailhouse 15.11.2007 - 476 Hits - 1 Antwort
Excel VBA: Modul per Makro importieren in geschütztes VBA-Projekt (Passwort bekannt)
snailhouse 29.10.2008 - 75 Hits - 4 Antworten
Excel VBA: Zeilen- und Spaltennummern aus Range auslesen (Druckbereich)
snailhouse 21.11.2008 - 65 Hits - 1 Antwort