Find Just Doesn't Work....

cicconmr

Board Regular
Joined
Jul 5, 2011
Messages
90
Does any one else have this problem where your find routine works some times but not others....even when you test it by searching for the same thing? Is this a common error...I could not find anything on it.

This sheet is for other people to use and it really is sad when I get emails that the find doesn't work all the time.....
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Find remembers all its settings between uses, including uses in the UI rather than code. It is therefore recommended to always specify all the arguments for the find (such as Lookin, Lookat, matchcase) rather than assuming they will be what you want.
 
Upvote 0
I'm Using:

Code:
Set Found = ws.Cells.Find(What:=Symbol & " ", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
                xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
                False, SearchFormat:=False)

So it is pretty detailed, here is my problem:

I want to find, say T, using LookAt:= xlWhole

This is because some tickers for stocks have T's in them, but aren't ATT the company I want. However....even though I'm sitting here looking at letter T it skips to my Error Sub.

Any ideas why this cold be? xlPart works but it also touches all cells with the letter T in them (I've tried screwing around with spaces but that doesn't help either)
 
Upvote 0
You can't find ATT by searching for T and specifying xlWhole though.
 
Upvote 0
Forget the & " "

Any how, I know that is how xlWhole is supposed to work @roya but it wasn't working so I was using xlPart which was kind of like a duct tape fix job.

I'll keep you posted on my progress, I'm trying to fix it so xlWhole consistantly works. I think it may have something to do with where I am searching.
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

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