Sub t()
Dim iZeile As Long
For iZeile = ActiveCell.End(xlUp).Row To 1 Step -1
If Cells(iZeile, ActiveCell.Column) <> "fehlt" Then
Cells(iZeile, ActiveCell.Column).Copy ActiveCell
Exit For
End If
Next iZeile
End Sub
cuSub t()
Dim iZeile As Long
For iZeile = ActiveCell.End(xlUp).Row To 1 Step -1
If Cells(iZeile, ActiveCell.Column) <> "fehlt" And <> "" Then
Cells(iZeile, ActiveCell.Column).Copy ActiveCell
Exit For
End If
Next iZeile
End Sub
Sub CopyNichtFehlt()
Dim Zelle As Range, AktiveZelle As Range
Const strtext = "fehlt"
Set AktiveZelle = ActiveCell
Set Zelle = AktiveZelle.End(xlUp)
Do Until Zelle.Value <> strtext Or Zelle.Row = 1
Set Zelle = Zelle.Offset(-1, 0)
Loop
If Zelle.Row = 1 And Zelle.Value = strtext Then
MsgBox "Nur """ & strtext & """ in dieser Spalte!"
Else
Zelle.Copy AktiveZelle
End If
End Sub
Sub CopyNichtFehlt()
Dim Zelle As Range, AktiveZelle As Range
Const strtext = "fehlt"
Set AktiveZelle = ActiveCell
Set Zelle = AktiveZelle.End(xlUp)
Do Until Not (Zelle.Value = strtext Or Zelle.Value = "") Or Zelle.Row = 1
Set Zelle = Zelle.Offset(-1, 0)
Loop
If Zelle.Row = 1 And (Zelle.Value = strtext Or Zelle.Value = "") Then
MsgBox "Nur """ & strtext & """ oder Leerzellen in dieser Spalte!"
Else
Zelle.Copy AktiveZelle
End If
End Sub