wie kann ich mit diesem Makro die Tabellenblätter 2 bis 13 gleichzeitig ansprechen? Kriege das gerade nicht hin.
Vielen Dank und Grüße Georg
Sub formatWE()
Dim i As Long
Dim cell As Range
Dim j As Long
'zuerst auslesen, Datumsangaben stehen in Zeile 6-36
For i = 6 To 36
If IsDate(Cells(i, 3).Value) = True Then
' If IsDate(wsh(j).Cells(i, 3).Value) = True Then
Tabelle1.Cells(i, 2).Value = Tabelle1.Cells(i, 3).Value
End If
Next i
'Formatierungen Wochenende
For Each cell In Range(Cells(6, 2), Cells(36, 2))
If Weekday(cell.Value) = 7 Or Weekday(cell.Value) = 1 Then 'die große Klammer
With cell.Interior
' .Pattern = xlGray8
.PatternColorIndex = xlAutomatic
.Color = 14403485
.TintAndShade = 0
.PatternTintAndShade = 0
End With
With cell.Font
.Name = "Arial"
.Bold = True
.Size = 9
.Color = 192
End With
'Das Wochentagformat
With cell
.NumberFormat = "ddd"
End With
'Der Rahmen
With cell.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With cell.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With cell.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
With cell.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = xlAutomatic
.TintAndShade = 0
.Weight = xlThin
End With
End If
Next cell
End Sub