AW: Übertrag die Zweite
24.02.2009 22:18:46
Gerd
Hallo Lemmi.
nach Spalte S soll wohl nichts mehr. Die Codezeilen hierzu habe ich auskommentiert.
Sub Übertrag3()
Dim zähler As Byte, zeile As Long, strPräfix As String
Worksheets("tabelle2").Range("S4:S5,AB4:AU5").ClearContents
'Worksheets("tabelle2").Cells(5, "S") = _
'Worksheets("tabelle1").Cells(2, "B") & "; " & _
'Worksheets("tabelle1").Cells(5, "H") & " " & Worksheets("tabelle1").Cells(5, "I")
strPräfix = Worksheets("tabelle1").Cells(2, "B") & "; "
For zeile = 5 To 105
If zähler = 21 Then Exit For
If Len(Worksheets("tabelle1").Cells(zeile, "E")) * _
Len(Worksheets("tabelle1").Cells(zeile, "F")) > 0 Then
zähler = zähler + 1
Worksheets("Tabelle2").Cells(5, 27 + zähler) = strPräfix _
& Worksheets("tabelle1").Cells(zeile, "E").Text & " " _
& Worksheets("tabelle1").Cells(zeile, "F").Text
End If
Next
zähler = 0
'Worksheets("tabelle2").Cells(4, "S") = _
'Worksheets("tabelle1").Cells(3, "C") & "; " & _
'Worksheets("tabelle1").Cells(5, "H") & " " & Worksheets("tabelle1").Cells(5, "I")
strPräfix = Worksheets("tabelle1").Cells(3, "C") & "; "
For zeile = 5 To 105
If zähler = 21 Then Exit For
If Len(Worksheets("tabelle1").Cells(zeile, "H")) * _
Len(Worksheets("tabelle1").Cells(zeile, "I")) > 0 Then
zähler = zähler + 1
Worksheets("Tabelle2").Cells(4, 27 + zähler) = strPräfix _
& Worksheets("tabelle1").Cells(zeile, "H").Text & " " _
& Worksheets("tabelle1").Cells(zeile, "I").Text
End If
Next
End Sub
Gruß Gerd