Drewbert34
New Member
- Joined
- Jun 21, 2011
- Messages
- 26
Hello all,
Please excuse my newbieness but I need help with some VBA code. I have a workbook that has Orange (cancellations) Green (changes) and Bold font (new additions). Every Friday I need to run a macro that will:
1. Select all inputs by filtering out blank cells on column A giving me my range. This will be an expanded range every week.
2. Remove all Bold font from the selected range in step 1.
3. Filter column B for unhighlighted cells (no fill). Filtering this column will exclude Orange highlighted cells which are cancellations and need to remian permananetly Orange (range A:AT). This column will never have green highlighted cells so by using this column to filter by I should be left with all "No fill" cells and any Green highlighted cells throughout the range.
4. No fill the filtered range which *should* remove and green highlighting on the sheet.
5. Remove the filters.
Below is the code my limited experience has come up with. if I perform these steps manually it works every time. If I run the code it always leaves behind the Green highlighted cells that I wish to be no fill.
Can someone help me simplify or correct my code so that it works?
Thank You!
Sub RemoveGreenBold2()
'
' RemoveGreenBold2 Macro
'
'
ActiveSheet.Range("$A$6:$AU$293").AutoFilter Field:=3, Criteria1:="<>"
Range("A7:AU7").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Font.Bold = False
ActiveSheet.Range("$B$6:$AU$293").AutoFilter Field:=3, Operator:= _
xlFilterNoFill
Range("B7:AU7").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Font.Bold = False
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
ActiveSheet.Range("$A$6:$AU$293").AutoFilter Field:=3
End Sub
Please excuse my newbieness but I need help with some VBA code. I have a workbook that has Orange (cancellations) Green (changes) and Bold font (new additions). Every Friday I need to run a macro that will:
1. Select all inputs by filtering out blank cells on column A giving me my range. This will be an expanded range every week.
2. Remove all Bold font from the selected range in step 1.
3. Filter column B for unhighlighted cells (no fill). Filtering this column will exclude Orange highlighted cells which are cancellations and need to remian permananetly Orange (range A:AT). This column will never have green highlighted cells so by using this column to filter by I should be left with all "No fill" cells and any Green highlighted cells throughout the range.
4. No fill the filtered range which *should* remove and green highlighting on the sheet.
5. Remove the filters.
Below is the code my limited experience has come up with. if I perform these steps manually it works every time. If I run the code it always leaves behind the Green highlighted cells that I wish to be no fill.
Can someone help me simplify or correct my code so that it works?
Thank You!
Sub RemoveGreenBold2()
'
' RemoveGreenBold2 Macro
'
'
ActiveSheet.Range("$A$6:$AU$293").AutoFilter Field:=3, Criteria1:="<>"
Range("A7:AU7").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Font.Bold = False
ActiveSheet.Range("$B$6:$AU$293").AutoFilter Field:=3, Operator:= _
xlFilterNoFill
Range("B7:AU7").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Font.Bold = False
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
ActiveSheet.Range("$A$6:$AU$293").AutoFilter Field:=3
End Sub