+ Reply to Thread
Results 1 to 4 of 4

Autofilter data in a Column based upon criteria in two other columns

  1. #1
    Registered User
    Join Date
    04-27-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2003
    Posts
    33

    Autofilter data in a Column based upon criteria in two other columns

    I'm having problems trying to filter out data in column A of the attached XL2000 workbook (sheet1) based upon two userform fields which correspond to criteria in columns C and D. I tried several variations in the code, but it does not seem to execute the second criteria, the form value from column D.

    The autofilter coding is in a macro, "module1" and the macro runs when the form is initialized.

    Macro Code:

    Please Login or Register  to view this content.
    Form initialize code:

    Please Login or Register  to view this content.
    Sample file
    AutoFilterTest.xls

  2. #2
    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: Autofilter data in a Column based upon criteria in two other columns

    Hi Southfish
    Try this code in the UserForm
    Please Login or Register  to view this content.
    and this code in Module1
    Please Login or Register  to view this content.
    Let me know of issues.
    Last edited by jaslake; 06-24-2012 at 08:46 PM.
    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.

  3. #3
    Registered User
    Join Date
    04-27-2012
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Autofilter data in a Column based upon criteria in two other columns

    Works like a charm!!!

    Thanks so, so much Jaslake.

    Hopefully my hair will grow back

  4. #4
    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: Autofilter data in a Column based upon criteria in two other columns

    You're welcome...my pleasure...glad I could help.

+ 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