Ich habe folgenden Code:
Sub Neu()
Dim i As Long
On Error Resume Next
With ActiveSheet
For i = 2 To .Cells(Rows.Count, 1).End(xlUp).Row
.Cells(i, 8).Value = .Cells(i, 1).Value & .Cells(i, 2).Value & .Cells(i, 3).Value _
& .Cells(i, 4).Value & .Cells(i, 5).Value
Next i
With .Columns("H:H").Characters(Start:=1, Length:=3).Font
.Size = 12
.FontStyle = "Fett"
.ColorIndex = 1
End With
With .Columns("H:H").Characters(Start:=4, Length:=2).Font
.Size = 12
.FontStyle = "Fett"
.ColorIndex = 5
End With
With .Columns("H:H").Characters(Start:=6, Length:=2).Font
.Size = 12
.FontStyle = "Fett"
.ColorIndex = 8
End With
With .Columns("H:H").Characters(Start:=8, Length:=4).Font
.Size = 12
.FontStyle = "Fett"
.ColorIndex = 10
End With
With .Columns("H:H").Characters(Start:=12, Length:=2).Font
.Size = 12
.FontStyle = "Fett"
.ColorIndex = 24
End With
End With
End Sub
******
Jetzt möchte ich die Funktion xlup quasi gegen eine Austauschen, wo ich einen Zellwert an eine Variable übergebe. Z.B. ein variabler numerischer Wert in Zelle 'I1'.
Und es sollen dann nur die Reihen 2 bis 'Wert aus I1' durchlaufen werden.
Hat jemand Ahnung wie ich hier vorgehe?
Danke und VG,
Tom