AW: zeile färben wenn zelle rot
17.04.2006 01:22:32
robag
Hier der CODE
Sub cd_Makro5()
Dim updatemode
updatemode = Application.ScreenUpdating = False
Application.ScreenUpdating = updatemode
'LOT_SH
Range("Q4").Select
ActiveCell.FormulaR1C1 = "=MID(RC[-14],1,5)"
Range("Q4").Select
Selection.AutoFill Destination:=Range("Q4:Q" & Cells(Rows.Count, 3).End(xlUp).Row), Type:=xlFillDefault
' nur die Inhalte
Range("Q4:Q65536").Select
Selection.Copy
Range("Q4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("A4:Q65536").Select
Selection.Sort Key1:=Range("Q4"), Order1:=xlAscending, Key2:=Range("N4") _
, Order2:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
xlSortNormal
'hier fängt die bed-form an.
Range("Q4:Q65536").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=ZÄHLENWENN($Q:$Q;Q4)>1"
Selection.FormatConditions(1).Interior.ColorIndex = 3
Range("C3").Select
Application.ScreenUpdating = True
Range("C3").Select
End Sub