colombo2003
08-22-2016, 06:32 AM
Hi everybody,
I have been stuggling for same time now but I don't now how to do that... So, I need your help.
Column used: A to Q
Row 1: header
Row 1: I click on sort&Filter ribbon icon, then filter (so filter is on but not in use).
I want to change the background color in a cell (e.g. P1), when I select, I click on filter and I apply one or more data as criteria.
Somebody can help me, please? Thx
I tried this:
In module:
Sub testF()
With ActiveSheet
If .AutoFilterMode = True And .FilterMode = True Then
With Range("P1").Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = RGB(50, 8, 202)
.TintAndShade = 0
.PatternTintAndShade = 0
End With
end if
end sub
In sheet1:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Address = "$P$1" Then
testF
End If
...
...
...
end sub
I have been stuggling for same time now but I don't now how to do that... So, I need your help.
Column used: A to Q
Row 1: header
Row 1: I click on sort&Filter ribbon icon, then filter (so filter is on but not in use).
I want to change the background color in a cell (e.g. P1), when I select, I click on filter and I apply one or more data as criteria.
Somebody can help me, please? Thx
I tried this:
In module:
Sub testF()
With ActiveSheet
If .AutoFilterMode = True And .FilterMode = True Then
With Range("P1").Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = RGB(50, 8, 202)
.TintAndShade = 0
.PatternTintAndShade = 0
End With
end if
end sub
In sheet1:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Address = "$P$1" Then
testF
End If
...
...
...
end sub