+ Reply to Thread
Results 1 to 9 of 9

Find with 2 criteria to be met

  1. #1
    Registered User
    Join Date
    10-25-2011
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    23

    Find with 2 criteria to be met

    Hi

    Is it possible to have 2 criteria in the what part of find? I have tried the & and it does not work

    At the moment I have a find in an if statement based on the other find ie:
    find criteria1
    if so find criteria2

    Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Find with 2 criteria to be met

    I am not sure if this is what you are after, but

    Please Login or Register  to view this content.
    Edit: Of coarse replace the cells with the criteria you are after.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    10-25-2011
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Find with 2 criteria to be met

    Hi

    Thanks for the response. I tried that and its not quite what Im looking for. What I would want it to do is search for 2 seperate criteria simultanously. Something like this which doesnt work:
    Please Login or Register  to view this content.
    Thanks again
    Mike

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Find with 2 criteria to be met

    Mike

    Can you attach an example workbook to better explain what you are trying to achieve.

    rylo

  5. #5
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Find with 2 criteria to be met

    I agree with rylo, that will help makes things a little clearer.

  6. #6
    Registered User
    Join Date
    10-25-2011
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Find with 2 criteria to be met

    Hi Rylo

    Not sure how to attach a file but here is the code. Essentially, in a cell Im trying to find a 5 digit number, for example 12621 and then looking for the word enbl

    34:1 1262102 Enbl

    I have it right now to look for the 5 digit number and if its found look for enbl. What I would like to do is have look for both the 5 digit number and the word enbl simultaneously in one find statement. Is this possible?

    Thanks
    Mike

    Please Login or Register  to view this content.

  7. #7
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Find with 2 criteria to be met

    Are both values in separate ranges? This sounds like advanced filter would be a better path to go.

    BTW, you can post an attachment by going to advanced post> Manage attachments> upload file from PC.

    Dave

  8. #8
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Find with 2 criteria to be met

    Hi

    OK your what is going to be something like
    Please Login or Register  to view this content.
    From your code, I think the 12621 is actually the variable v so it would be
    Please Login or Register  to view this content.
    HTH

    rylo

  9. #9
    Registered User
    Join Date
    10-25-2011
    Location
    toronto
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Find with 2 criteria to be met

    Hi again

    The asteriks worked perfectly- just tested it. There was a very small chance the product code would slip though using my code

    Thank you and thanks for all the help this forum has provide

    Mike

+ 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