ich nutze dieses Makro, um die bedingten Formatierungen per VBA zu setzen. Soweit alles in Ordnung.
Sub Bedingte_Formate()
Sheets("ToDo").Select
ActiveSheet.Cells.FormatConditions.Delete
Dim Wert As Variant
With Range("J8:J100")
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
With .FormatConditions.Add(xlCellValue, xlEqual, "=""NEU""")
.Font.ColorIndex = 1
.Interior.Color = RGB(174, 209, 233)
End With
With .FormatConditions.Add(xlCellValue, xlEqual, "=""WARTEN""")
.Font.ColorIndex = 1
.Interior.Color = RGB(255, 237, 153)
End With
With .FormatConditions.Add(xlCellValue, xlEqual, "=""ERLEDIGEN""")
.Font.ColorIndex = 1
.Interior.Color = RGB(255, 106, 106)
End With
End With
'usw.....
End Sub
Ich möchte den Range-Bereich dynamisch (soll ermittelt werden) gestalten. Ich habe im Arbeitsblatt einer Zelle den Name "START" gegeben. In dieser Zeile soll nach Zellinhalt "Status" gesucht werden. Die gefundene Zelle nehmen wir es ist J7, dann soll J7 um eine Zeile erweitert werden, dann wäre mein With Range("J8:J100") dynamisch ermittelt
Wie mache ich das bitte?
Ich denke so in etwa: Set rngFund = .Rows("START").Find(what:="Status", LookIn:=xlValues, lookat:=xlWhole)
Beste Grüße,
Selma