Thema Datum  Von Nutzer Rating
Antwort
Rot code in while schlaufe umschreiben
27.06.2016 10:11:07 Christian
NotSolved
27.06.2016 18:29:39 Gast89619
NotSolved

Ansicht des Beitrags:
Von:
Christian
Datum:
27.06.2016 10:11:07
Views:
1058
Rating: Antwort:
  Ja
Thema:
code in while schlaufe umschreiben

Guten Tag Allerseits

Ich wäre froh könnte mir jemand helfen diesen code in eine while Schlaufe umzuschreiben (falls das überhaupt geht).

Zur Info, bin blutiger Anfänger.

Hier der Code:

 

If AnfangMBSTJahr <> "" Then

If AnfangMBSTJahr = "2" Then

'MsgBox ("2016")

If AnfangMBST = "2" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 1).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 1).Select
End If


If AnfangMBST = "3" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 2).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 2).Select
End If

If AnfangMBST = "4" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 3).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 3).Select
End If


If AnfangMBST = "5" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 4).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 4).Select
End If


If AnfangMBST = "6" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 5).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 5).Select
End If


If AnfangMBST = "7" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 6).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 6).Select
End If

If AnfangMBST = "8" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 7).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 7).Select
End If

If AnfangMBST = "9" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 8).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 8).Select
End If

If AnfangMBST = "10" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 9).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 9).Select
End If

If AnfangMBST = "11" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 10).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 10).Select
End If

If AnfangMBST = "12" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 11).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 11).Select
End If

If AnfangMBST = "13" Then
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 12).Interior.Color = RGB(5, 70, 150)
Cells(Cells(Rows.count, "A").End(xlUp).Row + 0, "A").Offset(-1, 12).Select
End If

End If


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen

Thema Datum  Von Nutzer Rating
Antwort
Rot code in while schlaufe umschreiben
27.06.2016 10:11:07 Christian
NotSolved
27.06.2016 18:29:39 Gast89619
NotSolved