+ Reply to Thread
Results 1 to 3 of 3

InStr command finding too many matches

  1. #1
    Forum Contributor
    Join Date
    12-02-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    209

    Unhappy InStr command finding too many matches

    Hi all,
    I have this which I am trying to input a list of names of which the match could be in any of 4 columns....

    This all works, BUT, if for example I put in 'sarah' and 'ddddsaarhcccc' is in the data dump then both 'sarah' and 'ddddsaarhcccc' are found.

    But i only want to find 'sarah'


    Can someone please help. I cant seem to work it out.


    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    12-02-2009
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    209

    Re: InStr command finding too many matches

    I have included a dummy work book... i have put some dummy data into the physical and virtual worksheets.. and also included some search items in the 'servers to find' worksheet.

    Upon clicking the button the 'servers to find' WS you will see that it finds 'sarah' and '9999sarahcccc'...
    Attached Files Attached Files

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: InStr command finding too many matches

    Do not use instr.

    Please Login or Register  to view this content.



+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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