+ Reply to Thread
Results 1 to 20 of 20

Allow for filter to accommodate multiple partial text conditions

  1. #1
    Registered User
    Join Date
    02-07-2024
    Location
    Vacouver, Canada
    MS-Off Ver
    Office 365
    Posts
    46

    Allow for filter to accommodate multiple partial text conditions

    Is there a way to change this formula to allow for two more conditions to be in the filter

    =FILTER(CQ16:CR117,ISNUMBER(SEARCH("*-*",CR16:CR117)),"")

    those conditions being or "*SICK*" or "*TRAINING*" within the same range.
    Attached Files Attached Files
    Last edited by chrismg; 02-13-2024 at 03:49 AM.

  2. #2
    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,091

    Re: Allow for filter to accommodate multiple partial text conditions

    You could try this (untested):

    =FILTER(CQ16:CR117,(ISNUMBER(SEARCH("*-*",CR16:CR117))+(ISNUMBER(SEARCH("*SICK*",CR16:CR117))+(ISNUMBER(SEARCH("*TRAINING*",CR16:CR117))),"")

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    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.

  3. #3
    Registered User
    Join Date
    02-07-2024
    Location
    Vacouver, Canada
    MS-Off Ver
    Office 365
    Posts
    46

    Re: Allow for filter to accommodate multiple partial text conditions

    Unfortunately that didn't work it says formula in this cell contains an error.
    Last edited by AliGW; 02-13-2024 at 02:54 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  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,091

    Re: Allow for filter to accommodate multiple partial text conditions

    Then please provide a sample workbook. And please stop quoting unnecessarily.

  5. #5
    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,091

    Re: Allow for filter to accommodate multiple partial text conditions

    No workbook yet, so one further guess:

    =FILTER(CQ16:CR117,OR(ISNUMBER(SEARCH({"*-*","*SICK*","*TRAINING*"},CR16:CR117))),"")
    Last edited by AliGW; 02-13-2024 at 03:36 AM. Reason: Typo fixed.

  6. #6
    Registered User
    Join Date
    02-07-2024
    Location
    Vacouver, Canada
    MS-Off Ver
    Office 365
    Posts
    46

    Re: Allow for filter to accommodate multiple partial text conditions

    sorry, that one returned a valueerror. I just attached a sample workbook.

  7. #7
    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,091

    Re: Allow for filter to accommodate multiple partial text conditions

    OK - no wonder the formulae weren't working. This is why a sample workbook at the outset would have been a good idea.

    Can you explain how I would know which of the rows would be SICK or TRAINING? Those words don't appear anywhere in that range (the one that's already filtered), so you can't filter using them. I think we need some more detail.

    EDIT: Oh, wait - I think I see what you mean. Hang on ...
    Last edited by AliGW; 02-13-2024 at 03:57 AM.

  8. #8
    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,091

    Re: Allow for filter to accommodate multiple partial text conditions

    Try this:

    =FILTER(A16:B117,(ISNUMBER(SEARCH("*-*",B16:B117))+(B16:B117="SICK")+(B16:B117="TRAINING")),"")
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-07-2024
    Location
    Vacouver, Canada
    MS-Off Ver
    Office 365
    Posts
    46

    Re: Allow for filter to accommodate multiple partial text conditions

    SICK and or TRAINING would be present in Column B there is no TRAINING currently so its not in there right now. There are 3 SICK though in rows 94-96.

  10. #10
    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,091

    Re: Allow for filter to accommodate multiple partial text conditions

    See post #8.

  11. #11
    Registered User
    Join Date
    02-07-2024
    Location
    Vacouver, Canada
    MS-Off Ver
    Office 365
    Posts
    46

    Re: Allow for filter to accommodate multiple partial text conditions

    that returned a Valueerror, one sec I'll open what you attached first.

  12. #12
    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,091

    Re: Allow for filter to accommodate multiple partial text conditions

    It shouldn't!

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    D
    E
    16
    1
    430-1300
    17
    2
    430-1300
    18
    3
    430-1300
    19
    5
    500-1330
    20
    6
    500-1330
    21
    7
    500-1330
    22
    8
    500-1330
    23
    9
    530-1200
    24
    10
    530-1400
    25
    11
    545-1415
    26
    13
    600-1000
    27
    14
    600-1000
    28
    15
    600-1230
    29
    16
    600-1330
    30
    17
    600-1330
    31
    18
    600-1330
    32
    19
    600-1330
    33
    20
    600-1330
    34
    21
    600-1330
    35
    22
    600-1430
    36
    23
    600-1430
    37
    24
    600-1430
    38
    25
    600-1430
    39
    26
    600-1430
    40
    27
    600-1430
    41
    28
    600-1430
    42
    29
    600-1430
    43
    30
    600-1430
    44
    31
    600-1430
    45
    32
    600-1430
    46
    33
    600-1430
    47
    34
    630-1330
    48
    37
    700-1100
    49
    38
    700-1530
    50
    39
    7-1530
    51
    40
    800-1200
    52
    51
    TRAINING
    53
    70
    SICK
    54
    71
    SICK
    55
    72
    SICK
    Sheet: Sheet2

  13. #13
    Registered User
    Join Date
    02-07-2024
    Location
    Vacouver, Canada
    MS-Off Ver
    Office 365
    Posts
    46

    Re: Allow for filter to accommodate multiple partial text conditions

    Yeah, I saw that it worked in the workbook you linked too, weird. All I did was change the range applicable in my sheet and it's returning a valueerror. The only difference of in my layout is the Columns are CP and CQ instead of A and B.

  14. #14
    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,091

    Re: Allow for filter to accommodate multiple partial text conditions

    OK, well once again, without seeing the actual data, it's impossible to guess, but either there's something different about the real data or you've done something wrong.

    Unfortunately you can't diagnose an engine problem without having the car in front of you and the bonnet open.

  15. #15
    Registered User
    Join Date
    02-07-2024
    Location
    Vacouver, Canada
    MS-Off Ver
    Office 365
    Posts
    46

    Re: Allow for filter to accommodate multiple partial text conditions

    Damn, for the sample I gave you I copy and pasted the exact columns and just removed all the names with those numbers in column A. So I really don't know.

  16. #16
    Registered User
    Join Date
    02-07-2024
    Location
    Vacouver, Canada
    MS-Off Ver
    Office 365
    Posts
    46

    Re: Allow for filter to accommodate multiple partial text conditions

    wait I got it, I did type it wrong. Thanks so much, works great. Adding reputation for sure. This may even solve my problem for the other question I gave up on if you remember.

  17. #17
    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,091

    Re: Allow for filter to accommodate multiple partial text conditions

    So can you produce a sample workbook where the error manifests itself? Because without one, I have nothing to go on.

  18. #18
    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,091

    Re: Allow for filter to accommodate multiple partial text conditions

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  19. #19
    Registered User
    Join Date
    02-07-2024
    Location
    Vacouver, Canada
    MS-Off Ver
    Office 365
    Posts
    46

    Re: Allow for filter to accommodate multiple partial text conditions

    disregard, I corrected a keystroke error.

  20. #20
    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,091

    Re: Allow for filter to accommodate multiple partial text conditions

    Yes, I noticed. See post #18.

+ 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. [SOLVED] Filter formula with criteria that contains partial text
    By thematrix05 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-14-2023, 07:22 AM
  2. FILTER With Multiple Partial String Matches
    By helmanfrow in forum Excel General
    Replies: 7
    Last Post: 06-22-2020, 01:41 PM
  3. ComboBox Filter, search with partial text improvement
    By teun-lll in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-06-2020, 02:38 AM
  4. [SOLVED] Advanced Filter on Partial Text
    By endly in forum Excel General
    Replies: 2
    Last Post: 09-19-2015, 04:41 PM
  5. [SOLVED] A formula to accommodate a few simple math conditions
    By nicki_rae22 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-21-2014, 08:48 AM
  6. Lookup multiple partial match conditions and return values
    By darklans in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 04-18-2012, 03:26 AM
  7. Advanced Filter for Partial Text
    By newbieexceldude in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-21-2011, 12:59 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