Kann mir irgendwer sagen ob es möglich ist wenn ich in eine Zelle eine Verknüpfung auf eine andere Zelle schreibe
z.B.: =WENN(D7="";"";D7)
auch das Format dieser Zelle zu übernehemen
Bitte um Hilfe!!
mfg
Steifinga
Private Sub Worksheet_Change(ByVal Target As Range)
Dim RaBereich As Range, RaZelle As Range
Set RaBereich = Range("D7:IV755")
For Each RaZelle In Range(Target.Address)
If Not Intersect(RaZelle, RaBereich) Is Nothing Then
With RaZelle
Select Case UCase(.Value)
Case "1"
.Interior.Color = RGB(255, 204, 153)
.Font.Color = RGB(255, 204, 153)
Case "2"
.Interior.Color = RGB(255, 153, 0)
.Font.Color = RGB(255, 153, 0)
Case "3"
.Interior.Color = RGB(153, 51, 0)
.Font.Color = RGB(153, 51, 0)
Case "4"
.Interior.Color = RGB(153, 204, 255)
.Font.Color = RGB(153, 204, 255)
Case "5"
.Interior.Color = RGB(51, 102, 255)
.Font.Color = RGB(51, 102, 255)
Case "6"
.Interior.Color = RGB(0, 0, 128)
.Font.Color = RGB(0, 0, 128)
Case ""
.Interior.ColorIndex = 0
.Font.ColorIndex = 0
End Select
End With
End If
Next RaZelle
Set RaBereich = Nothing
End Sub