Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Anzeige
Inhaltsverzeichnis

Kopieren ohne doppel

Forumthread: Kopieren ohne doppel

Kopieren ohne doppel
01.12.2003 18:22:48
Sascha
Hallo liebe Freunde
Es ist wieder mal zeit für Eure Hilfe
Mit diesem Makro


Sub kod()
Dim wks As Worksheet
Dim iRow As Integer, iRowT As Integer
Set wks = Worksheets("Tabelle2")
wks.Columns("a").ClearContents
iRowT = 1
For iRow = 1 To Range("A65536").End(xlUp).Row
If Cells(iRow, 1) <> " " Then
If WorksheetFunction.CountIf(wks.Columns(1), _
Cells(iRow, 1)) = 0 Then
iRowT = iRowT + 1
wks.Cells(iRowT, 1) = Cells(iRow, 1)
End If
End If
Next
End Sub


Kann ich Spalte A von aktiven Blatt zu Tabelle 2 sortieren.
Mein Problem ist das ich möchte das diese kopieren ohne doppelten IMMER von
TABELLE1 zu TABELLE2 geht und nicht wie zur zeit von aktiven Blatt zu Tabelle2.
Wer hilft weiter????
Danke in voraus
Gruß Sascha
Anzeige

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Kopieren ohne doppel
01.12.2003 18:51:17
PeterW
Hallo Sascha,

das sollte ungetestet so gehen:

Sub kod()
Dim wks As Worksheet
Dim iRow As Integer, iRowT As Integer
Set wks = Worksheets("Tabelle2")
wks.Columns("a").ClearContents
iRowT = 1
With Sheets("Tabelle1")
For iRow = 1 To .Range("A65536").End(xlUp).Row
If .Cells(iRow, 1) <> "" Then
If WorksheetFunction.CountIf(wks.Columns(1), _
Cells(iRow, 1)) = 0 Then
iRowT = iRowT + 1
wks.Cells(iRowT, 1) = .Cells(iRow, 1)
End If
End If
Next
End With
End Sub

Gruß
Peter
Anzeige
AW: Kopieren ohne doppel
01.12.2003 20:20:39
Sascha
Danke Peter
Es funktioniert
Gruß Sascha
Anzeige
Anzeige
Live-Forum - Die aktuellen Beiträge
Datum
Titel
14.05.2026 13:31:09
14.05.2026 09:50:42
13.05.2026 19:14:18