+ Reply to Thread
Results 1 to 6 of 6

Advanced Filter VBA code

  1. #1
    Registered User
    Join Date
    06-17-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    7

    Advanced Filter VBA code

    Hi,

    Nembie to excel and VBA, i am looking for a code to perform an advanced filter when a command button is clicked and transfer the data to a new sheet, is this possible? it is a very basic operation i am looking for, see attached sheets.

    Any help would be greatly appreciated!

    Thanks in advance

    Paul
    Attached Images Attached Images

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Advance Filter VBA code

    Just do it in Excel with the macro recorder on, it will create the code.

  3. #3
    Registered User
    Join Date
    06-17-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Advance Filter VBA code

    Hi Bob,

    Thanks fast for the response, i have tried that but it doesnt seem to work???? Most likely operator error!!!

    I have attached the spreadsheet would this help anymore?

    Many thanks.

    Regards

    Paul
    Attached Files Attached Files

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Advance Filter VBA code

    You need to insert a column B on the second sheet with a heading of 'Letter', then use

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-17-2010
    Location
    Scotland
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Advance Filter VBA code

    Hi Bob,

    Thank you so much for the assistance! Works perfectly.

    Many thanks.

    Regards

    Paul

  6. #6
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Advance Filter VBA code

    The trick here is that when you want to filter the data onto another sheet, that sheet has to be active. Don't know why, just know that is the reality

+ 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