+ Reply to Thread
Results 1 to 5 of 5

VB Code to filter data with 2 criteria

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to filter data with 2 criteria

    Hello:

    Please refer to attached file.
    I need VB Code to do following.
    Need to do search on starting text as shown in cell G1 and Vendor ID entered in cell G5 and list at cell H2 down.
    Example, i type in "BUD" in cell G1 and "1 " (VID) then the result will be as shown.


    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,516

    Re: VB Code to filter data with 2 criteria

    When you used the macro recorder, after all, you have over 4000 posts, what did you get?
    I have a feeling that you just want someone else to do the work for you. See a couple posts ago: VB code to do page setup and find page breaks
    Last edited by jolivanes; 06-14-2019 at 08:45 PM.

  3. #3
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: VB Code to filter data with 2 criteria

    Try this.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by bakerman2; 06-14-2019 at 11:27 PM.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to filter data with 2 criteria

    Hello Bakermanw2:
    Thanks a lot

    R

  5. #5
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: VB Code to filter data with 2 criteria

    You're welcome riz and thanks for 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] Advanced Filter Code : Criteria Range More Than 1 Row Breaks Filter
    By PaulGW in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-10-2021, 04:30 PM
  2. [SOLVED] Vba code to filter and copy data based on criteria.
    By sapnawat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2018, 02:11 AM
  3. VBA code to filter data /3 criteria/
    By hharutyunyan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2017, 03:28 PM
  4. [SOLVED] Need code to copy data based on filter criteria to new workbook as save in a file location
    By msantucci in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-24-2015, 02:47 AM
  5. Replies: 1
    Last Post: 12-12-2014, 06:46 AM
  6. Filter data from a Master sheet based on multiple criteria by VBA code
    By judeprem in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2013, 03:27 PM
  7. [SOLVED] VBA Code to apply criteria to a filter
    By kenadams378 in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 08-13-2012, 04:34 AM

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