+ Reply to Thread
Results 1 to 5 of 5

Filtering an Excel file

  1. #1
    Registered User
    Join Date
    01-06-2018
    Location
    West Coast USA
    MS-Off Ver
    2013
    Posts
    61

    Filtering an Excel file

    I don't normally cross-post, but with one foot in Access and the other in Excel it sometimes becomes necessary to tap into both bodies of knowledge.......................

    In the following Sub, an Excel sheet is filtered to the current value of the current report number, "RptNum". Does anyone know how to modify the filtering statement to filter column 1 to "RptNum" OR column 2 equal to the string "RU"?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Re: Filtering an Excel file

    GraeagleBill

    If you must cross post, then please edit your question and supply links showing where it has been cross posted so our users can see if your question has been answered.

    DominicB

  3. #3
    Registered User
    Join Date
    01-06-2018
    Location
    West Coast USA
    MS-Off Ver
    2013
    Posts
    61

    Re: Filtering an Excel file

    That never occurred to me for two reasons. First I think in the last 20 years I've maybe cross-posted 3 times and second that I take the responsibility to post any solution on both forums when a conclusion is reached. However, your point is well taken and one can view the same post at http://www.accessforums.net/showthread.php?t=71485 if interest warrants.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,223

    Re: Filtering an Excel file

    Thank you for providing the link.

    The cross-posting rule, and the other simple rules we ask you to follow, are outlined here: https://www.excelforum.com/forum-rul...rum-rules.html

    Please take a moment or two to read them through so that you know and understand what our expectations are.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,153

    Re: Filtering an Excel file

    There is no direct "OR" for 'Autofilter' method for two fields together, but if we take into account the importance of logical operators, "OR" in this case:

    p | q | p v q
    ========
    0 | 0 | 0 => all False
    1 | 0 | 1 => "RptNum" is True
    0 | 1 | 1 => "RU" is True
    1 | 1 | 1 => "RptNum" and "RU" are True

    where "1" is True

    it can be done indirectly.

    Try something like that and see if it works:
    Please Login or Register  to view this content.
    If this is not true, then colleagues on the forum will improve me ...

+ 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. Replies: 4
    Last Post: 09-03-2017, 06:32 AM
  2. [SOLVED] Filtering, sorting and finding missing sequence using macro (for big Excel file)
    By TallOne in forum Excel Programming / VBA / Macros
    Replies: 31
    Last Post: 05-31-2014, 11:24 AM
  3. problem with filtering on XLS file
    By SteveLake in forum Excel General
    Replies: 1
    Last Post: 10-09-2013, 09:20 AM
  4. text file merging and filtering using macro's
    By scambug in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-08-2012, 06:04 AM
  5. Excel 2007 : filtering excel file
    By Blakespops in forum Excel General
    Replies: 1
    Last Post: 09-27-2011, 01:10 PM
  6. Importing file bigger than 65536 rows, filtering results problem
    By rinser in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-22-2010, 10:39 AM
  7. Embed File - Filtering Problem
    By yawnzzzz in forum Excel General
    Replies: 1
    Last Post: 05-17-2010, 12:20 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