Makro vereinfachen
Jesse
ich habe ein Makro mit dem Makrorecorder aufgenommen und wollte wissen ob mir jemand helfen _
kann dieses zu vereinfachen?
Sub BedingteFormatierung()
Range(Range("B7"), Cells(Rows.Count, 2).End(x1up)).Select
Selection FormatConditions.Delete
Selection.FormatConditions.Add Type:x1Expression, Formula1:="$B$7=""Sa""
Selection FormatConditions(1).Interior.Colorindex = 6
Selection.FormatConditions.Add Type:x1Expression, Formula1:="$B$7=""So""
Selection FormatConditions(1).Interior.Colorindex = 4
Range(Range("C7"), Cells(Rows.Count, 3).End(x1up)).Select
Selection FormatConditions.Delete
Selection.FormatConditions.Add Type:x1Expression, Formula1:="$C$7=""Sa""
Selection FormatConditions(1).Interior.Colorindex = 6
Selection.FormatConditions.Add Type:x1Expression, Formula1:="$C$7=""So""
Selection FormatConditions(1).Interior.Colorindex = 4
End Sub
Das ist jetzt nicht das ganze Makro, ich lasse diese Formatierung nämlich in mehreren Spalten ( B7 - AF7) durchführen. Das ganze wirkt für mich ziemlich umständlich. Geht das auch einfacher?
Vielen Dank für die Mühe schon einmal im Vorraus!