+ Reply to Thread
Results 1 to 2 of 2

Search multiple attributes across several columns, VBA Advanced Filtering

  1. #1
    Registered User
    Join Date
    11-08-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2007
    Posts
    56

    Search multiple attributes across several columns, VBA Advanced Filtering

    Hi Guys

    I have devised a relational database which is collecting data for specific entities. However specific non-unique attributes gets stored across multiple columns.

    How can I use Advanced Filtering to Define a set of criteria that searches for the same attribute across several columns? More specific. The Attribute, MS030 can be present in multiple columns,
    But it don't have to be a requirement that it is present in all the columns.

    So, if criteria A is present in column A -> copy all rows to "Filter", But if criteria A is also present in Column B -> Copy all rows to "Filter". But if Criteria A is present in both Column A and B, don't copy twice.

    I have attached a working sample which I hope illustrates my problem.

    When I define the criteria the code assumes the criteria MUST be present in both columns?!
    How do I correct this? Should I use another approach then Advanced Filtering..

    Best regards
    Danny
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-08-2012
    Location
    Copenhagen
    MS-Off Ver
    Excel 2007
    Posts
    56

    Re: Search multiple attributes across several columns, VBA Advanced Filtering

    I solved it my self. It was a stupid matter of some boolean expressions.. So the code used was

    Please Login or Register  to view this content.
    And then using combinations of AND and OR entries spread over several rows in the criteria range..

+ 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. Excel advanced filtering on multiple sheets
    By blind527 in forum Excel General
    Replies: 4
    Last Post: 05-04-2013, 08:56 PM
  2. Advanced filtering with multiple lines in VBA code
    By surfthenet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-15-2012, 06:56 AM
  3. creating VB code using advanced search criteria with multiple data validation lists?
    By Jonathan Bay in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-14-2011, 09:56 AM
  4. Advanced Filtering with multiple criteria
    By drumbody in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-16-2007, 08:51 AM

Tags for this Thread

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