fehlerhafte Ersetzung
27.03.2007 12:20:00
diivanbo
Danke im voraus. divanbo
'Ermittlung der letzten Zeile
lz = Cells(Rows.Count, 1).End(xlUp).Rows.Row
'Durchlauf aller Zeilen rückwärts
For t = lz To 1 Step -1 'Zählung rückwärts bis Zeile 2
If Cells(t, 3).Value = "L00001" Then Cells(t, 5) = "L100"
If Cells(t, 3).Value = "L00002" Then Cells(t, 5) = "L100"
If Cells(t, 3).Value = "L00003" Then Cells(t, 5) = "L100"
If Cells(t, 3).Value = "L00004" Then Cells(t, 5) = "L100"
If Cells(t, 3).Value = "L00005" Then Cells(t, 5) = "L100"
If Cells(t, 3).Value = "L00006" Then Cells(t, 5) = "L110"
If Cells(t, 3).Value = "L00007" Then Cells(t, 5) = "L100"
If Cells(t, 3).Value = "L00008" Then Cells(t, 5) = "L560"
If Cells(t, 3).Value = "L00009" Then Cells(t, 5) = "L110"
If Cells(t, 3).Value = "L00010" Then Cells(t, 5) = "L510"
If Cells(t, 3).Value = "E04000" Then Cells(t, 5) = "L500"
t = t - 1
' End If
Next t
so sieht mein Ergebnis aus.
2007 01 E03000 9-04-0001 L100 96
2007 01 E04000 1-05-0001 L500 9
2007 01 E04000 1-10-0004 L200 5
2007 01 E04000 1-10-0004 L500 3
2007 01 E04000 1-10-0004 L200 1
2007 01 E04000 1-10-0005 L500 9