Hallo ?,
in diesem Forum bitte mit Real(vor)namen auftreten; siehe dazu auch die "Forums-FAQ". Danke!
Ich weiß nicht, ob ich Dein Problem richtig verstanden habe; trotzdem biete ich Dir mal diesen Lösungsvorschlag an:
Sub SortierenSpalte()
Dim c As Range
Dim sJz As String
Dim laR As Long
sJz = InputBox(vbCr & vbCr & "Jahreszahl eingeben:", "Abfrage Jahreszahl")
If sJz = "" Then
MsgBox "Keine Eingabe !" & vbCr & vbCr & "Makro-Abbruch !", _
vbCritical, "Dezenter Hinweis für " & Application.UserName & ":"
Exit Sub
End If
For Each c In Range("B15:B50")
If c.Value <> "" And c.Value < CInt(sJz) Then
laR = Cells(Rows.Count, 2).End(xlUp).Row
If laR < 59 Then laR = 59
Range("B" & laR + 1).Value = c.Value
c.ClearContents
End If
Next c
Range("B15:B50").Sort Key1:=Range("B15"), Order1:=xlAscending, _
Header:=xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub
Viel Erfolg und ein gutes Neues Jahr wünscht
WernerB.
P.S.: Dieses Forum lebt auch von den Rückmeldungen der Fragesteller an die Antworter !