Habe unteren Code
Ich möchte Bitte unabhängig ob "S" groß oder "s" geschrieben wird,trotzdem "1 Schicht" eingetragen wird.
Könnte mir bitte jemand helfen.
Danke Heinz
Case Is = ("S")
Cells(i, 4) = ("1 Schicht")
Cells(i, 6) = 8
Sub test()
i = 1
Select Case UCase(Range("A1"))
Case Is = ("S")
Cells(i, 4) = ("1 Schicht")
Cells(i, 6) = 8
End Select
End Sub
Sub Stundeneintrag()
Dim i As Integer
On Error Resume Next
With Sheets("Jänner")
For i = 7 To 257
Case Is = ("S")
Cells(i, 4) = ("1 Schicht")
Cells(i, 6) = 8
Case Else
Next i
End With
End Sub
Sub Stundeneintrag()
Dim i As Integer
On Error Resume Next
With Sheets("Jänner")
For i = 7 To 257
Select Case Cells(i, 4).Value
Case Is = ("1")
Cells(i, 4) = ("1 Schicht")
Cells(i, 6) = 8
Case Is = ("2")
Cells(i, 4) = ("2 Schicht")
Cells(i, 6) = 8
Case Is = ("3")
Cells(i, 4) = ("3 Schicht")
Cells(i, 6) = 8
Case Is = ("S")
Cells(i, 4) = ("1 Schicht")
Cells(i, 6) = 8
Case Is = ("1BF")
Cells(i, 4) = ("Bez. Freiz.")
Cells(i, 6) = 8
Case Is = ("2BF")
Cells(i, 4) = ("Bez. Freiz.")
Cells(i, 6) = 8
Case Is = ("3BF")
Cells(i, 4) = ("Bez. Freiz.")
Cells(i, 6) = 8
Case Is = ("SBF")
Cells(i, 4) = ("Bez. Freiz.")
Cells(i, 6) = 8
Case Is = ("1B")
Cells(i, 4) = ("1 Schicht")
Cells(i, 5) = ("Bringschicht")
Cells(i, 6) = 8
Case Is = ("1B")
Cells(i, 4) = ("1 Schicht")
Cells(i, 5) = ("Bringschicht")
Cells(i, 6) = 8
Case Is = ("2B")
Cells(i, 4) = ("2 Schicht")
Cells(i, 5) = ("Bringschicht")
Cells(i, 6) = 8
Case Is = ("3B")
Cells(i, 4) = ("3 Schicht")
Cells(i, 5) = ("Bringschicht")
Cells(i, 6) = 8
Case Is = ("1U"), ("2U"), ("3U"), ("SU")
Cells(i, 4) = ("Urlaub")
Cells(i, 8) = 8
Case Is = ("1K"), ("2K"), ("3K"), ("SK")
Cells(i, 4) = ("Krank")
Cells(i, 9) = 8
Case Is = ("1Ü")
Cells(i, 4) = ("1 Schicht")
Cells(i, 5) = ("Ü.Stunden")
Case Is = ("2Ü")
Cells(i, 4) = ("2 Schicht")
Cells(i, 5) = ("Ü.Stunden")
Case Is = ("3Ü")
Cells(i, 4) = ("3 Schicht")
Cells(i, 5) = ("Ü.Stunden")
Case Else 'andere Einträge = Inhalte löschen in Zeile i, Spalte F bis P
End Select
Next i
End With
End Sub
Sub Stundeneintrag()
Dim i As Integer
On Error Resume Next
With Sheets("Jänner")
For i = 7 To 257
Select Case UCase(Cells(i, 4))
Case Is = ("1")
Cells(i, 4) = ("1 Schicht")
Cells(i, 6) = 8
Case Is = ("2")
Cells(i, 4) = ("2 Schicht")
Cells(i, 6) = 8
Case Is = ("3")
Cells(i, 4) = ("3 Schicht")
Cells(i, 6) = 8
Case Is = ("S")
Cells(i, 4) = ("1 Schicht")
Cells(i, 6) = 8
Case Is = ("1BF")
Cells(i, 4) = ("Bez. Freiz.")
Cells(i, 6) = 8
Case Is = ("2BF")
Cells(i, 4) = ("Bez. Freiz.")
Cells(i, 6) = 8
Case Is = ("3BF")
Cells(i, 4) = ("Bez. Freiz.")
Cells(i, 6) = 8
Case Is = ("SBF")
Cells(i, 4) = ("Bez. Freiz.")
Cells(i, 6) = 8
Case Is = ("1B")
Cells(i, 4) = ("1 Schicht")
Cells(i, 5) = ("Bringschicht")
Cells(i, 6) = 8
Case Is = ("1B")
Cells(i, 4) = ("1 Schicht")
Cells(i, 5) = ("Bringschicht")
Cells(i, 6) = 8
Case Is = ("2B")
Cells(i, 4) = ("2 Schicht")
Cells(i, 5) = ("Bringschicht")
Cells(i, 6) = 8
Case Is = ("3B")
Cells(i, 4) = ("3 Schicht")
Cells(i, 5) = ("Bringschicht")
Cells(i, 6) = 8
Case Is = ("1U"), ("2U"), ("3U"), ("SU")
Cells(i, 4) = ("Urlaub")
Cells(i, 8) = 8
Case Is = ("1K"), ("2K"), ("3K"), ("SK")
Cells(i, 4) = ("Krank")
Cells(i, 9) = 8
Case Is = ("1Ü")
Cells(i, 4) = ("1 Schicht")
Cells(i, 5) = ("Ü.Stunden")
Case Is = ("2Ü")
Cells(i, 4) = ("2 Schicht")
Cells(i, 5) = ("Ü.Stunden")
Case Is = ("3Ü")
Cells(i, 4) = ("3 Schicht")
Cells(i, 5) = ("Ü.Stunden")
Case Else 'andere Einträge = Inhalte löschen in Zeile i, Spalte F bis P
End Select
Next i
End With
End Sub