→ topgunguy:thx 11/09 12:20
Private Sub Worksheet_Calculate()
ColorAutoFilter
End Sub
'This sub goes in a regular module sheet
Sub ColorAutoFilter()
'This sub should be triggered by the recalculation of the worksheet and then called by a
'Worksheet_Calculate sub. You can force a recalculation after an AutoFilter by using the "trick"
'of including at least one volatile cell in your worksheet. A volatile cell has a formula using
'volatile functions like NOW, TODAY, OFFSET, INDIRECT, RAND, INFO or CELL (except when CELL
'uses the "filename" parameter).
'If more than one worksheet uses AutoFilter, then each Worksheet_Calculate sub can call ColorAutoFilter
Dim FilterNum As Long
With ActiveSheet
If .AutoFilterMode Then
For FilterNum = 1 To .AutoFilter.Filters.Count
If .AutoFilter.Filters(FilterNum).On Then
'.AutoFilter.Range.Columns(FilterNum).Interior.ColorIndex = 6 'yellow
.AutoFilter.Range(1, FilterNum).Interior.ColorIndex = 6
Else
.AutoFilter.Range.Columns(FilterNum).Interior.ColorIndex = xlNone
End If
Next
Else
.Cells.Interior.ColorIndex = xlNone
End If
End With
※ 編輯: topgunguy 來自: 118.170.209.9 (07/04 00:10)
軟體:excel
版本:2010
各位版友大家好,我想請教有關自動篩選的問題。
按alt+d+f+f後,所有欄都會出現三角形,點選的那幾欄會出現漏斗,
但是實在很不明顯,欄太多就不容易找到。
請問有沒有辦法讓篩選的那欄的第一格變色呢?
感謝~
--
錢會變薄,資產會縮水。
通通花光才有100%的享受,
這就是活在當下。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.170.206.137