+ Reply to Thread
Results 1 to 13 of 13

Filters with three criteria in semi-ready code

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Filters with three criteria in semi-ready code

    Attachment 147609Hi..
    I'd like to make an adjustment in the code below.

    How can I use this code, made by my friend Jaslake, to use it with three criteria?

    I need to fetch the data sheet of "origin", using the three criteria that are in cell "A2, B2, C2" worksheet "Destination", and play the result in "A6" worksheet "Destination".

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Vaibhav; 04-14-2012 at 09:47 PM.
    "No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Filters with three criteria in semi-ready code

    Try

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Filters with three criteria in semi-ready code

    Thanks but I need to be with the event Private Sub Worksheet_Change (ByVal Target As Range).

    Can you do?

  4. #4
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Filters with three criteria in semi-ready code

    Hum... You can just copy and paste the code to the event module? We are free consultant, we can't always do everything. Just saying.

  5. #5
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Filters with three criteria in semi-ready code

    I still believe that anyone can do, the jalaske could, maybe he can help me.
    Thanks anyway!

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Filters with three criteria in semi-ready code

    Hi marreco
    JieJenn has posted the obvious solution that apparently doesn't do as you require...so. I need to look at it further. The question is, what fires the code. In the code you posted (code you attributed to me so I presume I wrote it) it fires on a change in ANY of these cells "$A$2 $B$2 $C$2"...so, if that's the case I'd assume it can be adapted...but I'll need to think about it a bit. Get back to you.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  7. #7
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Filters with three criteria in semi-ready code

    yes, exactly these cells is that fire!

    I thought it was just change this part, but did not work.

    Please Login or Register  to view this content.
    Thank you!

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Filters with three criteria in semi-ready code

    Hi marreco
    Yes, well it doesn't quite work that way as you've discovered. As JieJenn suggested, you need to use Advanced Filter. I'll look at it.

  9. #9
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Filters with three criteria in semi-ready code

    My friend told me this amazing website today called Google, you should check it out marreco

  10. #10
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Filters with three criteria in semi-ready code

    Before I could not post my original file.

    I tested your code JieJenn, and is not working.

    I edited my attachment, try using your code with this spreadsheet for the 1st post.
    Last edited by marreco; 03-28-2012 at 07:50 AM.

  11. #11
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Filters with three criteria in semi-ready code

    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  12. #12
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Filters with three criteria in semi-ready code

    Thank you ...

    but I'll try your tip. data is not appearing in the spreadsheet "Destination".

    Why?

  13. #13
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Filters with three criteria in semi-ready code

    Hi.

    Solved thanks to Donal and Marcol, thanks to all

    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