Sub KopierenOhneDoppelte
26.11.2003 23:13:48
Sascha
Mit folgendem Code :
Sub KopierenOhneDoppelte()
Dim wks As Worksheet
Dim iRow As Integer, iCol As Integer, iRowT As Integer
Set wks = Worksheets("Tabelle2")
iRow = 1
iCol = 1
wks.Columns("A").ClearContents
Do Until IsEmpty(Cells(iRow, iCol))
Do Until IsEmpty(Cells(iRow, iCol))
If WorksheetFunction.CountIf( _
wks.Columns(1), Cells(iRow, iCol).Value) = 0 Then
iRowT = iRowT + 1
wks.Cells(iRowT, 1).Value = Cells(iRow, iCol).Value
End If
iCol = iCol + 1
Loop
iRow = iRow + 1
iCol = 1
Loop
End Sub
Versuche ich werte aus Tabelle1 zu Tabelle2 zu kopieren. Es funktioniert super wenn alle Zellen in Tabelle1 Spalte A voll sind. Wenn Z.b.A14 leer ist dann wird nur bis A14 kopiert.
Es sollten alle lehre Zellen genau so wie doppelte eintrage entfallen und auch werte nach eine lehre Zelle kopiert seien.
Wer hilft weiter????
Danke
Gruß Sascha...