Guitarmageddon
Board Regular
- Joined
- Dec 22, 2014
- Messages
- 159
Hello all. Many thanks to @Fluff for getting me sorted in some other steps within this current macro.
I would like to add some VBA in at the end of my macro that does two different sets of highlights:
1.) highlight the entire row if the site number in Column M equals 60001 OR 70001. I want this DARK purple
2.) Highlight the entire row if the site number in column M equals 16001. I want this LIGHT purple.
I have given a quick example of some of the highlights below.
Notes:
My report length is dynamic, but you can reference column A since that will always go down to the end of the report
My number of columns extends out to AC, which I believe is 29 columns total on the report. If possible Id like to confine the highlight to that.
I had something similar in another macro I had (based on some unrelated values), but it was really hard for me to dissect and repurpose since I cant remember what I did! Id appreciate any help greatly here from the masters!
I would like to add some VBA in at the end of my macro that does two different sets of highlights:
1.) highlight the entire row if the site number in Column M equals 60001 OR 70001. I want this DARK purple
2.) Highlight the entire row if the site number in column M equals 16001. I want this LIGHT purple.
I have given a quick example of some of the highlights below.
Notes:
My report length is dynamic, but you can reference column A since that will always go down to the end of the report
My number of columns extends out to AC, which I believe is 29 columns total on the report. If possible Id like to confine the highlight to that.
I had something similar in another macro I had (based on some unrelated values), but it was really hard for me to dissect and repurpose since I cant remember what I did! Id appreciate any help greatly here from the masters!
VBA Code:
Range("A2").Select
Columns("l:l").ColumnWidth = 10.14
Do While ActiveCell.Offset(0, 12) <> ""
If ActiveCell.Offset(0, 12).FormulaR1C1 <> "000" Then
Range(ActiveCell, ActiveCell.Offset(0, 42)).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535 'yellow
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End If
ActiveCell.Offset(1, 0).Select
Loop