Option Explicit
Sub schleife()
Dim intI As Integer, intSpalte As Integer
Dim intStart As Integer, intZiel As Integer
For intI = 1 To 5
Select Case intI
Case Is = 5
intStart = 4
intZiel = 40
Case Is = 6
intStart = 50
intZiel = 100
Case Is = 7
intStart = 105
intZiel = 196
Case Is = 8
intStart = 200
intZiel = 300
Case Is = 9
intStart = 301
intZiel = 400
Case Is = 10
intStart = 401
intZiel = 500
End Select
For intSpalte = intStart To intZiel
'......Befehle
Next
Next
End SubDim Anfangswert As Variant
Dim Endwert As Variant
Dim i, a, spalte As Integer
Anfangswert = Array(4, 50, 105)
Endwert = Array(40, 100, 196)
For i = 5 To 7
For spalte = Anfangswert(i - 5) To Endwert(i - 5)
...
Next spalte
Next i
End SubSub Schleife()
Dim Bereiche As Range
Dim zelle As Range
Set Bereiche = Application.Union(Range("A2:A3"), Range("B3:B5"), Range("C3:E3"))
For Each zelle In Bereiche
Cells(zelle.Row, zelle.Column) = "hallihallo"
Next zelle
End Sub
Summewenn und Zählenwenn mit mehreren Kriterien mit Excel
JoeKe 17.05.2009 - 22590 Hits - 1 Antwort
Rangliste mit Bezug auf mehreren Spalten und einer Bedingungen
Can23A 21.04.2008 - 72 Hits - 1 Antwort
VBA+For Schleife
Gast00001 04.09.2008 - 30 Hits - 3 Antworten
For Schleife mit Unterbrechungen
Berni333 15.09.2008 - 6 Hits - 5 Antworten
for next schleife
wmei 28.04.2009 - 237 Hits - 7 Antworten