Consulting

Results 1 to 4 of 4

Thread: Complex Filtering & Copying With VBA (Need Help)

  1. #1
    VBAX Newbie
    Joined
    Apr 2014
    Posts
    2
    Location

    Complex Filtering & Copying With VBA (Need Help)

    Hey All,

    I am attempting to create a sort of complex selection system with VBA and could really use some help. The primary goal I am trying to achieve(there are a couple of filters I need to create) is to find the most recent date a certain customer is mentioned so that I can copy some information from that particular line into a sort of summary sheet. The information I am filtering through is spread over multiple tabs which adds another level of complexity. I'm relatively new to VBA so this is particularly daunting to me as I am not very familiar with the syntax.

    I have attached an example of what I would like the end result to look like to this post, please let me know if you have any questionsAny advice on coding and syntax to achieve this would be great.

    VBA Filter&Summary Example.xlsm

    Thanks for you help!
    -ATurek

  2. #2
    VBAX Tutor david000's Avatar
    Joined
    Mar 2007
    Location
    Chicago
    Posts
    276
    Location
    Your "Example" workbook makes me question your authenticity.
    "To a man with a hammer everything looks like a nail." - Mark Twain

  3. #3
    VBAX Newbie
    Joined
    Apr 2014
    Posts
    2
    Location
    Well considering I would get in quite a bit of trouble if I used the actual names of the companies and such I figured I might as well have a little fun with it. Sorry if you did not find it as amusing as I did.

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    In the attached (no vba/macro), I've manually: added a sheet, consolidated the three sheets to one database (a multiple consolidated ranges pivot table didn't work for me), created a pivot table, and chosen the Top 10 (using top 1) value filter in the Date Ordered column. The last column of the Pivot Table can be hidden but was necessary for the Top 10 filter to work.

    The pivot table shows the same results as your sample.

    I think most of this can be automated; is this the way you like to go?



    Quote Originally Posted by ATurek View Post
    The information I am filtering through is spread over multiple tabs which adds another level of complexity.
    As an aside, it's much easier to have a single database like on the added sheet as your working database instead of multiple tabs - you can easily Autofilter the table for month by month data which look exactly the same as your existing sheets. In addition, as you're discovering, having the data on multiple tabs makes things difficult, for any sort of reporting.
    Attached Files Attached Files
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •