+ Reply to Thread
Results 1 to 4 of 4

How to limit FIND searches to a specified range ?

  1. #1
    Forum Contributor
    Join Date
    08-04-2005
    Location
    Madrid, Spain
    MS-Off Ver
    2010
    Posts
    241

    How to limit FIND searches to a specified range ?

    I need to check if there are occurrences of a word in column A. I use this simple code:
    Please Login or Register  to view this content.
    It works all right bcs FIND returns ‘Error’ when there are no occurrences or no more.
    The trouble is that it will go on beyond the specified range of column A and find occurrences anywhere in the worksheet, which I don't want. How can I restrict the search to the specified range only?
    (I know there are other functions like For… Next… with Set…, etc. But FIND is more economical in terms of code lines and I want to keep it short bcs my macro is already very long).

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to limit FIND searches to a specified range ?

    With your code:

    Please Login or Register  to view this content.
    But why not:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    08-04-2005
    Location
    Madrid, Spain
    MS-Off Ver
    2010
    Posts
    241

    Re: How to limit FIND searches to a specified range ?

    Thanks very much, xladept. That does the thing perfectly.
    Yes, I very willingly do you a little justice by adding to your reputation.
    ACA

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to limit FIND searches to a specified range ?

    You're welcome and thanks for the rep!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] find the lower and upper limit if data is in between on that limit
    By clangeles in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-27-2012, 06:18 AM
  2. [SOLVED] Find Next Macros in loop searches different value
    By hkayani08 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-30-2012, 01:01 PM
  3. Limit the search range in FIND() function
    By Orson100 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2009, 07:10 AM
  4. Limit the dynamic range of find and replace
    By duugg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2009, 09:04 AM
  5. best way to be sure Find thoroughly searches sheet
    By caspian915 in forum Excel General
    Replies: 6
    Last Post: 10-28-2008, 01:57 PM
  6. Getting valid web searches and avoiding sites that contaminate web searches
    By David McRitchie in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-12-2006, 10:10 PM
  7. [SOLVED] Limit find range
    By Pete in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2005, 01:06 PM
  8. FIND formula that searches from right?
    By KellyB in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-21-2005, 07:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1