+ Reply to Thread
Results 1 to 5 of 5

3 columns being filtered with AND commands, can 2 columns be filtered using OR command?

  1. #1
    Registered User
    Join Date
    03-21-2014
    Location
    utah, usa
    MS-Off Ver
    Excel 2007
    Posts
    6

    3 columns being filtered with AND commands, can 2 columns be filtered using OR command?

    (Excel 2007) I have a report with 10 columns. Out of those 10, I have 3 columns that I am using a filtering macro on. If the cell in column A is >325 AND on that same row column B is >325 AND same row on column C is >150, then we keep that whole row in the report.

    Otherwise, it hides the whole row if even one of those columns don't match the criteria.

    My question: My boss now wants me to show the row if column A is >325 OR column B is >325 (also, column C will still have to be >150. Is there a way to do this with filtering? Kind of an <or> command, or do I need some sort of vba code? Is this even possible?
    Last edited by tafoyavision; 03-25-2014 at 05:25 PM. Reason: got a rolled newspaper nose smack from admin

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Filter or VBA or is this even possible?

    How many rows do you have, approximately?

    It is possible to do this with a few formulae - it is easier to "filter" the data onto another sheet, so the original data remains untouched. If you are interested in this approach then attach a sample workbook so I can set it up for you.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-21-2014
    Location
    utah, usa
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Filter or VBA or is this even possible?

    Thanks Pete, there are 133,000 rows....Is this method still valid with that much data?

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Filter or VBA or is this even possible?

    There is one formula which will be copied down all those rows, and it will take some time to calculate initially, but then it won't need to recalculate unless you make a change that affects it. The other two formulae use MATCH and INDEX, and are only copied down as far as you need them. I can't say if this will take longer to do than with a macro, but it is fairly easy to set up and maintain.

    I've just responded to a similar thread here:

    http://www.excelforum.com/excel-form...on-sheet1.html

    which uses the same techniques, so maybe you can amend that file. You will just need to change the conditions in the first formula.

    Hope this helps.

    Pete

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Filter or VBA or is this even possible?

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

+ 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. Need to filter a report filter based on the previous filter
    By elliotencore in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-28-2014, 07:44 AM
  2. Replies: 5
    Last Post: 12-19-2013, 06:58 AM
  3. Change Pivot table Filter Based on Cell Value *Multiple Filter items* Possible?
    By Flydd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-27-2012, 06:57 AM
  4. Filter several pivot tables by one programmed date range filter in Excel 2003
    By olewka in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2011, 11:49 AM
  5. VBA to change filter for n pivots based on page filter selection for the first pivot
    By shama.arige in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2011, 11:42 AM

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