+ Reply to Thread
Results 1 to 9 of 9

Multiple keyword in a single cell. Possible to filter words separately in dropdown menu?

  1. #1
    Registered User
    Join Date
    07-14-2017
    Location
    SWE
    MS-Off Ver
    Office 365
    Posts
    7

    Multiple keyword in a single cell. Possible to filter words separately in dropdown menu?

    Hi!

    E.g.
    • Cell in row 1 has "red, blue, yellow"
    • Cell in row 2 has "red, green, purple"
    • Cell in row 3 has "orange, purple"

    Is it possible to filter these separately in the drop-down menu? For example, if I pulled down the drop-down menu, I'd see separate checkboxes for "red", "blue", "yellow", "green", "purple", and "orange". And if I checked "red"...only rows 1 and 2 would show up. If I checked "purple"...only rows 2 and 3 show up. Etc.

    I am aware of the custom text filter option to filter what contains a specific text. But as other users should use the file, a dropdown menu where you can see all keywords is required.

    Can anyone edit my attached example file to show me how it works? That would be very kind, thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,768

    Re: Multiple keyword in a single cell. Possible to filter words separately in dropdown men

    You will need VBA for enable multiple keyword selection.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Multiple keyword in a single cell. Possible to filter words separately in dropdown men

    This is confusing since you talk of check boxes and a data validation drop down.

    The B14 validation drop down can only show one item. If keyword 1 is picked I can see how you want rows 1 2 & 5. But if keyword 3 is picked you'd only see row 2.

    You need to clarify

    It seems to ne you'd be better creating a complete set of data with row 1 appearing three times with keywords 1, 2 5 in the adjacent column. Ditto row 2 appearing twice with keyword 1 & 3 ...etc
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    07-14-2017
    Location
    SWE
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Multiple keyword in a single cell. Possible to filter words separately in dropdown men

    Quote Originally Posted by Richard Buttrey View Post
    This is confusing since you talk of check boxes and a data validation drop down.

    The B14 validation drop down can only show one item. If keyword 1 is picked I can see how you want rows 1 2 & 5. But if keyword 3 is picked you'd only see row 2.

    You need to clarify

    It seems to ne you'd be better creating a complete set of data with row 1 appearing three times with keywords 1, 2 5 in the adjacent column. Ditto row 2 appearing twice with keyword 1 & 3 ...etc
    Sorry for not being clear enough.

    Then let us start with picking only one keyword via validation drop and the result should be just the rows containing that keyword. And I can't just let the rows reappear, as external users have to use the table. Could you alter the table I uploaded to give an example how this would work?

    Thanks.

    Quote Originally Posted by JohnTopley View Post
    You will need VBA for enable multiple keyword selection.
    Ok, thx for clarifying.
    Last edited by klm_345; 11-26-2021 at 08:36 AM.

  5. #5
    Registered User
    Join Date
    07-14-2017
    Location
    SWE
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Multiple keyword in a single cell. Possible to filter words separately in dropdown men

    Actually there is a thread with the exact same problem: they talked about a solution but I can't rebuild it. Unfortunately I am not allowed to post any links yet... The name of the thread: "Multiple words in a single cell. Possible to filter words separately in the dropdown menu?"

    I tried to continue that thread, but it was closed after I posted, despite having exactly the same problem.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,768

    Re: Multiple keyword in a single cell. Possible to filter words separately in dropdown men

    Code for multi-selection in dropdown


    Please Login or Register  to view this content.
    Code to get output

    Please Login or Register  to view this content.
    Highlighted areas are named ranges which need adjusting to fit your actual w/book

    As entries are added in drop-down the output rows are updated.

    Clear C14 then select data
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-14-2017
    Location
    SWE
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Multiple keyword in a single cell. Possible to filter words separately in dropdown men

    Thank you very much! That looks great. I might have questions regarding implementation in my worksheet.

    I am not into coding, so sorry for probably stupid questions.

    E.g. where is the range of the dropdown content defined? It is in cells H1 to H6, but I can't see it in the code.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,768

    Re: Multiple keyword in a single cell. Possible to filter words separately in dropdown men

    It isn't in the code: it is in Data Validation>>Allow: List Source: =Keywords (named range).

  9. #9
    Registered User
    Join Date
    07-14-2017
    Location
    SWE
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Multiple keyword in a single cell. Possible to filter words separately in dropdown men

    Thanks again!

    Would it be possible
    - to write the output to a new worksheet
    - or (that would be best) to just fade out the rows not containing the keywords in the original data table (rows 5-9). E.g. choosing keyword 1 would fade out row 7 and 8, when you delete the input in C14 all rows would be displayed again.

    (and where in the code it is defined where the output is written, and how to change that)
    Last edited by klm_345; 11-29-2021 at 07:46 AM.

+ 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: 7
    Last Post: 11-26-2021, 06:04 AM
  2. Delete single choice in a multichoice dropdown menu
    By ExcelRose123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-24-2021, 05:34 AM
  3. Search multiple words in a single cell
    By ruissu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2016, 10:38 AM
  4. Dropdown menu respects filter
    By bluestarrr in forum Excel General
    Replies: 1
    Last Post: 07-28-2014, 01:34 AM
  5. [SOLVED] Using dropdown menu to filter table, possible?
    By Jaymes88 in forum Excel General
    Replies: 2
    Last Post: 05-10-2013, 10:11 AM
  6. Separately printing multiple tables from a single sheet
    By NewDawn999 in forum Excel General
    Replies: 9
    Last Post: 04-01-2013, 09:32 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