.Find won't find cells hidden with AutoFilter

FotS

New Member
Joined
Jun 16, 2011
Messages
37
Hey guys,

I have a table that is setup with an AutoFilter so it's a little easier to work with considering the range of data that's in it. I'm trying to setup some code for a couple of the columns that when there is a change (data entered), it searches the whole column to verify it isn't a duplicate entry. The issue I'm coming across is that .Find will not locate a duplicate if that duplicate is currently "hidden" from the AutoFilter. Searching online I found people saying to set the LookIn argument to xlFormulas, but that doesn't work.

The code works perfectly, otherwise.

Oh, and using Excel 2003, SP3.

Any ideas?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Wow threads drop fast here....

Anyway, wanted to ask another question here concerning AutoFilters and the cells it hides....

Is there any way (aside from manually doing checks to see if the cell's value meets the AutoFilter's criteria) to tell if a cell is hidden (not visible) by the AutoFilter? Doing range.Hidden returns an error "Unable to get the Hidden property of the Range class."
 
Upvote 0
Hi,

To check if a cell is hidden (not visible) maybe something like

Code:
Dim mydata as Range, aCell as Range
 
Set mydata = Range("A1:A10")
 
 For Each aCell In mydata
        If aCell.EntireRow.Hidden Then MsgBox aCell.Row
 Next aCell

HTH

M.
 
Upvote 0
Thank you sir! That did it. It's interesting that one would be forced to check via the EntireRow, though....
 
Upvote 0
It's interesting that one would be forced to check via the EntireRow, though....
Not surprising really though since you cannot hide a single cell (or any range) without hiding the whole row or the whole column (or both).
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,351
Members
452,907
Latest member
Roland Deschain

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