AW: Formatübernahme in mehrere Tabellenblätter
24.12.2008 07:47:58
Tino
Hallo Anja,
geht es hiermit?
Es wird die Schriftfarbe und die Zellfarbe übertragen,
dabei wird auch auf Groß und Kleinschreibung geachtet.
Sub BereichFormat()
Dim Bereich As Range, myCell As Range, rngCell As Range
Dim myTab As Worksheet
Dim A As Long
With Sheets("Gewinne")
Set Bereich = .Range("C70", .Cells(.Rows.Count, "C").End(xlUp))
End With
With Application
.ScreenUpdating = False
For Each rngCell In Bereich
If rngCell <> "" Then
For Each myTab In ThisWorkbook.Worksheets
If myTab.Name <> "Gewinne" Then
With myTab
For A = 1 To Application.WorksheetFunction.CountIf(.Cells, rngCell)
If A = 1 Then
Set myCell = .Cells.Find(rngCell, .Range("A1"), xlValues, 1, 1, 1, True, False)
myCell.Interior.Color = rngCell.Interior.Color
myCell.Font.Color = rngCell.Font.Color
Else
Set myCell = .Cells.FindNext(myCell)
myCell.Interior.Color = rngCell.Interior.Color
myCell.Font.Color = rngCell.Font.Color
End If
Next A
End With
End If
Next myTab
End If
Next rngCell
.ScreenUpdating = True
End With
End Sub
Gruß Tino