paquirl
Board Regular
- Joined
- Oct 12, 2010
- Messages
- 226
- Office Version
- 2016
- Platform
- Windows
this macro is supposed to highlight rows that meet certain criteria in one of three columns. it is not highlighting all the rows in the third column.
Sub paquirl3()
' ABSOLUTEHIGHLIGHTED Macro
' Macro recorded 3/10/2011 by Andrew Quirl
'
' Keyboard Shortcut: Ctrl+Shift+U
'
Dim lr As Long
lr = Cells(Rows.Count, 1).End(xlUp).Row
Rows("4:4").Select
Selection.AutoFilter
Selection.AutoFilter Field:=7, Criteria1:=">=5 to 6 weeks", Operator:= _
xlAnd
Range("A5:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.ColorIndex = 6
Range("A5:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.Pattern = xlSolid
Selection.AutoFilter Field:=7
Selection.AutoFilter Field:=25, Criteria1:=">(35) Active", Operator:= _
xlAnd
Range("A405:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.ColorIndex = 6
Range("A405:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.Pattern = xlSolid
Selection.AutoFilter Field:=25
Selection.AutoFilter Field:=38, Criteria1:="Yes"
Range("A1026:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.ColorIndex = 6
Range("A1026:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.Pattern = xlSolid
Selection.AutoFilter Field:=38
End Sub
Sub paquirl3()
' ABSOLUTEHIGHLIGHTED Macro
' Macro recorded 3/10/2011 by Andrew Quirl
'
' Keyboard Shortcut: Ctrl+Shift+U
'
Dim lr As Long
lr = Cells(Rows.Count, 1).End(xlUp).Row
Rows("4:4").Select
Selection.AutoFilter
Selection.AutoFilter Field:=7, Criteria1:=">=5 to 6 weeks", Operator:= _
xlAnd
Range("A5:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.ColorIndex = 6
Range("A5:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.Pattern = xlSolid
Selection.AutoFilter Field:=7
Selection.AutoFilter Field:=25, Criteria1:=">(35) Active", Operator:= _
xlAnd
Range("A405:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.ColorIndex = 6
Range("A405:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.Pattern = xlSolid
Selection.AutoFilter Field:=25
Selection.AutoFilter Field:=38, Criteria1:="Yes"
Range("A1026:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.ColorIndex = 6
Range("A1026:A" & lr).EntireRow.SpecialCells(xlCellTypeVisible).Interior.Pattern = xlSolid
Selection.AutoFilter Field:=38
End Sub