benötige Hilfe: Habe script, aber weiß nicht, wie auch die leeren Zellen unterpunktet werden, wenn in Spalte F etwas steht. Wie ist das anzupassen?
Wer hilft mir bitte?
soll auch rein - aber auch leere Zellen underlined, wenn in F etwas steht:
Selection.FormatConditions(1).Borders(xlLeft).LineStyle = xlNone
Selection.FormatConditions(1).Borders(xlRight).LineStyle = xlNone
Selection.FormatConditions(1).Borders(xlTop).LineStyle = xlNone
With Selection.FormatConditions(1).Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
vorhanden - hier sollte es mit rein:
Sub bedingt_Format1()
Application.Goto Reference:="Format1"
'Austausch X zu R
' ActiveWorkbook.Save
' Selection.Replace What:="X", Replacement:="R", LookAt:=xlPart, _
' SearchOrder:=xlByRows, MatchCase:=False
' bedingtes Format Rot, Blau, Schwarz
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=UND($F5=""2x/Woche"";ODER(O5=""R"";O5=""X""))"
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = False
.ColorIndex = 2
End With
Selection.FormatConditions(1).Interior.ColorIndex = 3
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=UND($F5=""1x/Woche"";ODER(O5=""R"";O5=""X""))"
With Selection.FormatConditions(2).Font
.Bold = True
.Italic = False
.ColorIndex = 2
End With
Selection.FormatConditions(2).Interior.ColorIndex = 5
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=UND($F5=""1x/Monat"";ODER(O5=""R"";O5=""X""))"
With Selection.FormatConditions(3).Font
.Bold = True
.Italic = False
.ColorIndex = 2
End With
Selection.FormatConditions(3).Interior.ColorIndex = 1
Range("d5").Select
End Sub
Hilfe wäre prima! Danke!
Lupo