Row State

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,644
Office Version
  1. 365
Platform
  1. Windows
Is there a way of establishing whether a row is currently filtered or not when filters are applied to a set of data?


Thanks
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi mike,

I'm not sure if what you're asking, if so, normally when a row is filtered the row number change to blue as below:

Excel Workbook
A
11
52
62
92
125
142
Sheet1
Excel 2010



Regards
 
Upvote 0
Sorry, I meant is there a way using VBA to establish this.


Thanks
 
Upvote 0
Filter some data and then run this bit of code on it:
Code:
If ActiveSheet.AutoFilterMode Then ActiveSheet.AutoFilterMode = False
 
Upvote 0
I really want to establish whether the activecell is filtered or not rather than is a filter applied to the data.
 
Upvote 0
Think I have nailed this
Code:
Set rngRow = Range(Selection, Selection.Offset(0, 1))
            If rngRow.Rows(rngRow.Row).SpecialCells(xlCellTypeVisible).Count - 1 = 1 Then
                Do Until rngRow.Rows(rngRow.Row).SpecialCells(xlCellTypeVisible).Count - 1 = 1
                    Selection.Offset(1, 0).Select
                    Set rngRow = Range(Selection, Selection.Offset(0, 1))
                Loop
                Else

            
            End If
 
Upvote 0
Try with:
Original input:

Excel Workbook
A
11
21
31
41
52
62
73
83
92
101
113
125
131
142
Sheet1
Excel Workbook
AB
52This cell is filtered
62This cell is filtered
73This cell is filtered
83This cell is filtered
92This cell is filtered
113This cell is filtered
142This cell is filtered
Excel 2010
#VALUE!
Excel 2010


Hope this helps,

Regards
 
Upvote 0

Forum statistics

Threads
1,224,594
Messages
6,179,792
Members
452,942
Latest member
VijayNewtoExcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top