+ Reply to Thread
Results 1 to 2 of 2

Add Filter Field for Workbook Consolidation Macro

  1. #1
    Registered User
    Join Date
    09-21-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    13

    Add Filter Field for Workbook Consolidation Macro

    Hi I was wondering if anyone had any suggestions to modify the code below. Currently it filters for cells including "WEB", I would like the ability to add the value "OMS" so it will consolidate any rows of data with either of those fields. I have highlighted the code in red that I would like to add other variables to.

    Thanks

    Please Login or Register  to view this content.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Add Filter Field for Workbook Consolidation Macro

    Hi mlegge04

    I wondered how an OR criteria was coded using VBA to solve your problem. I recorded a macro and then did the steps manually to see what VBA code appeared. See the video below which shows VBA knows how to do OR with Autofilter Criteria.

    http://screencast.com/t/YMs3SRzvpmZ

    I hope this solves your problem. I really hope it shows you how to solve your own problems using record and see what Excel thinks the VBA looks like, to do what we do manually.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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