Dim
existiert
As
Boolean
existiert =
False
Dim
Suche
As
String
Suche = ActiveSheet.Range(
"B1"
)
Worksheets(
"Vergleich"
).
Select
Range(
"A2"
).
Select
For
i = 1
To
20
If
ActiveCell <> Suche
Then
ActiveCell.Offset(0, 1).
Select
Else
existiert =
True
Next
i
If
existiert =
True
Then
If
MsgBox(
""
& Suche &
" existiert bereits. Überschreiben?"
, vbYesNo) = vbNo
Then
Worksheets(
"Vergleich"
).
Select
Range(
"A2"
).
Select
For
i = 1
To
20
If
ActiveCell.Value <>
""
Then
ActiveCell.Offset(0, 1).
Select
Else
Exit
For
Next
i
Else
: ActiveCell.
Select
End
If
End
If
If
existiert =
False
Then
Worksheets(
"Vergleich"
).
Select
Range(
"A2"
).
Select
For
i = 1
To
20
If
ActiveCell.Value <>
""
Then
ActiveCell.Offset(0, 1).
Select
Else
Exit
For
Next
i
End
If
For
Each
Zelle
In
Quelltab1.Range(
"B1:B23"
)
Zieltab.Cells(Zaehler, i) = Zelle
Zaehler = Zaehler + 1
Next
Zelle