+ Reply to Thread
Results 1 to 22 of 22

Advance Filter - vba

  1. #1
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Advance Filter - vba

    Hi All,

    I have here a file, and it has some validations.
    After running the validation, all that was tagged as "PROCEED" in column AA should be copied just like below.

    Attachment 378006


    May i ask how to do this using advance filter using VBA?

    I have lots of data and tried using formula such as index match but the file kept on hanging. Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Advance Filter - vba

    Hi,
    Based on what column do you want the data to be extracted..?
    Is it the "PROCEED" Rows you want to extract..?

    AND

    Which columns do you want in the output..?
    Are the ones listed below
    Personel Number ACCOUNT GRP COMPANY CODE ACCOUNTING CLERK CREDIT REP GROUP KEY
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  3. #3
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Re: Advance Filter - vba

    Hi Vikas,

    Thank you for your response. Once the analysis in column AA is "proceed" below are the needed output of those who passed:

    Column AC - Personel Number
    Column AD -ACCOUNT GRP
    Column AE-COMPANY CODE
    Column AF -ACCOUNTING CLERK
    Column AG - CREDIT REP GROUP
    Column AH -KEY

  4. #4
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Advance Filter - vba

    Output in sheet2. Run "test"
    Attached Files Attached Files
    Last edited by Blokeman; 02-18-2015 at 08:39 AM.
    Please click the * Add Reputation if this helps
    If solved remember to mark Thread as solved

    "I'm glad to help and this is not meant to sound smart, but either you have super-human vision to see all those controls cleared one by one with the code I posted, or your computer is really slow."

  5. #5
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Advance Filter - vba

    Try this one:-

    Please Login or Register  to view this content.
    Last edited by Vikas_Gautam; 02-18-2015 at 09:25 AM.

  6. #6
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Re: Advance Filter - vba

    Hi Bloke Man,

    the output should be in AC. Where can i change in the code?

  7. #7
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Re: Advance Filter - vba

    Hi Vikas!

    Your code is working. But the output should be on column AC to AH in sheet 1 also

  8. #8
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Advance Filter - vba

    All the rows will be filtered from A to last column so I have to put in another sheet.

  9. #9
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Re: Advance Filter - vba

    Oh i see. but i need it on the column AC. and the headers should not be copied

  10. #10
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Advance Filter - vba

    I have made the changes in the above code..
    Try and tell..

  11. #11
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: Advance Filter - vba

    Click the Run Button
    Check the attached file:-
    Attached Files Attached Files

  12. #12
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Re: Advance Filter - vba

    Hi Vikas!

    Superb!! Got all the correct data needed!!

  13. #13
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Re: Advance Filter - vba

    hi vikas,

    i tried transferring the code you gave in the attached, how wver, i have an error with that code and says it cant delete merge cells.

    The final look of the template would be like this in the attached. And now, when i clicked the run button, the data in column T up to column AA is deleted. Can you help me wiht this?
    Attached Files Attached Files

  14. #14
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Advance Filter - vba

    Here is the new code:-
    Please Login or Register  to view this content.
    Check the attached file:-
    Attached Files Attached Files
    Last edited by Vikas_Gautam; 02-20-2015 at 03:26 AM.

  15. #15
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Advance Filter - vba

    Magandang hapon

    Made a mistake on my first code;

    Please Login or Register  to view this content.

  16. #16
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Re: Advance Filter - vba

    Hi Vikas,

    It copies all the data even the invalid for next step.. Only those who are tagged as proceed should be copied.

  17. #17
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Advance Filter - vba

    Check the corrected attached file:-
    Attached Files Attached Files

  18. #18
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Re: Advance Filter - vba

    Hi Vikas!

    Wow!!

    it worked really great! Juts a thought, i think its my fault. It should be column AC to AH until the key only.
    I might have doubled up the account group and key in column AI and AJ. and

    How can i remove since it was also being populated? nonetheless, superb!! made my day
    Last edited by geliedee; 02-20-2015 at 03:52 AM.

  19. #19
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Re: Advance Filter - vba

    Hi Blokeman,

    thank you also! how can i put in the code to copy only the text and not the format itself?

  20. #20
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Advance Filter - vba

    Quote Originally Posted by geliedee View Post
    Hi Vikas!

    Wow!!

    it worked really great! Juts a thought, i think its my fault. It should be column AC to AH until the key only.
    I might have doubled up the account group and key in column AI and AJ. and

    How can i remove since it was also being populated? nonetheless, superb!! made my day
    Sorry, I couldn't understand..

  21. #21
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    Re: Advance Filter - vba

    Sorry vikas, it all okay now. Thanks for your patience and for helping me out!

  22. #22
    Forum Contributor
    Join Date
    08-15-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Advance Filter - vba

    Try this without format.
    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)

Similar Threads

  1. Advance Filter
    By tt388 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-28-2008, 07:32 AM
  2. Advance Filter
    By betmck in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2007, 02:48 PM
  3. Advance Filter
    By Obi-Wan Kenobi in forum Excel General
    Replies: 3
    Last Post: 03-22-2006, 05:50 PM
  4. Advance filter search does not filter an exact match
    By cfiiland in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2005, 08:05 AM
  5. advance filter
    By DANmcc in forum Excel General
    Replies: 2
    Last Post: 04-20-2005, 06:06 PM

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