I use this code to "search" a value in columns A or B and if found to select the row the value is in.
Trouble is if I look for say value 11 (the code finds 1) I understand what happens but need your help to fix it hoping to keep it as simple as it is. (pls note I cannot use filters)
Thank you all.
Find Whole Cell Value, Not Part
-
-
-
-
Re: Find Whole Cell Value, Not Part
Fen, that can also cause issues. From the help
QuoteRemarks
The settings for LookIn, LookAt, SearchOrder, and MatchByte are saved each time you use this method. If you don’t specify values for these arguments the next time you call the method, the saved values are used. Setting these arguments changes the settings in the Find dialog box, and changing the settings in the Find dialog box changes the saved values that are used if you omit the arguments. To avoid problems, set these arguments explicitly each time you use this method. -
Re: Find Whole Cell Value, Not Part
Yeah, I'm aware of that, and do a record-restore every time I use Find in one of my public-facing apps. However I didn't mention it, because I figured it might have been a little out of the scope of this discussion.
-
-
Re: Find Whole Cell Value, Not Part
Now I have edited the thread title to an non-selfish one (take note, ndendrinos) we can talk Find Method until the cows come home
-
Re: Find Whole Cell Value, Not Part
Thank you Fencliff
-
If you wish to continue using this free service.
Please read the This Page which you agreed to when joining. In particular the point on Thread Titles. After you have done so please CLICK HERE and Private Message Dave Hawley with your acceptance, or non-acceptance of the rules. Please also include a link to this Thread. You can copy this directly from the Address bar of your Browser. When this is done your thread will be re-opened.
[fa]*[/fa]
-
Re: Find Whole Cell Value, Not Part
Quote"Yeah, I'm aware of that, and do a record-restore every time I use Find in one of my public-facing apps. "
Please elaborate this remark. I have tested the suggestion as given above and it works well. Not sure if this is relevant but the macro saves the workbook at the end of its run.
Thank you. -
Re: Find Whole Cell Value, Not Part
You can restore the default settings (or actually record any settings you want to) by doing a dummy search with the values you want to "leave behind". The SearchFormat settings can be accessed through Application.FindFormat.
Unfortunately the general settings cannot be read. At one point I had a procedure that ran an elaborate set of tests that would determine what settings the user had before, but I've lost that long ago somewhere, and it's not really worth it.
-
-
Re: Find Whole Cell Value, Not Part
Thank you Fencliff
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!