S
Steve
Hi I came across this great macro to identify which columns in a multi
column spreadsheet are filtered (Credit to Juan Pablo Gonzalez)
Sub GetColumns()
Dim Sht As Worksheet
Dim i As Long
Set Sht = ActiveSheet
With Sht.AutoFilter
For i = 1 To .Filters.Count
If .Filters(i).On Then
MsgBox .Range(1, i).Column
End If
Next i
End With
End Sub
However, the message box only tells you which number of column is
filtered. ie 1 2, 3, 56 etc. Is it possible to return the actual
column header name (i.e name, address etc) or even the column title
(AA, BZ, GG etc)
Thanks in advance
Steve
column spreadsheet are filtered (Credit to Juan Pablo Gonzalez)
Sub GetColumns()
Dim Sht As Worksheet
Dim i As Long
Set Sht = ActiveSheet
With Sht.AutoFilter
For i = 1 To .Filters.Count
If .Filters(i).On Then
MsgBox .Range(1, i).Column
End If
Next i
End With
End Sub
However, the message box only tells you which number of column is
filtered. ie 1 2, 3, 56 etc. Is it possible to return the actual
column header name (i.e name, address etc) or even the column title
(AA, BZ, GG etc)
Thanks in advance
Steve