AutoFilter
Ok, but the problem would be that the data changes daily. So, I can not
select the rang. I need to just select the filter data only.
"Dave Peterson" wrote:
When you record your macro, add one more step.
Apply the filter
filter contains Total
select the range
edit|goto|special|visible cells only
And continue with your recording.
pgarcia wrote:
Hello all, I'm having a problem with the following. I'm trying to only select
what is filter and nothing elso, but I have not been able to find the right
code(s) to do so. Thanks
Sub yellowtotal()
Selection.AutoFilter Field:=4, Criteria1:="=*total*", Operator:=xlAnd
Range("A2:W98").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Interior.ColorIndex = 36
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Font.Bold = True
ActiveSheet.ShowAllData
Range("A2").Select
End Sub
--
Dave Peterson
|