+ Reply to Thread
Results 1 to 6 of 6

Table search for string

  1. #1
    Registered User
    Join Date
    09-04-2019
    Location
    Zabrze, Poland
    MS-Off Ver
    2016
    Posts
    6

    Table search for string

    Hello everyone,

    I'm new to either VBA programming and this group so greetings.

    I have got some problem, seems like it's pretty easy but I can't handle this.

    So what I got is:
    -ComboBox Microsoft Forms 2.0
    -Table1 in another sheet (Columns - Supplier Name; Supplier ID)

    ComboBox search by typing works only for first matching signs. I'd like to prepare macro that search through my Table1 for strings. For example Table1 has "BridgeBuild Thomas Label Limited" and I'd like it to search for this record by typing "Thomas Label" which cannot be done for this moment in my ComboBox. I thought about preparing macro that starts with InputBox and someone who is using sheet can type any string he/she wants.

    In result I'd like it to return all matching records (all records that contains *Thomas Label*) in Table1 in MsgBox. If it's possible I'd also like it to return corresponding ID that is in Table1.

    If there is another/more efficient solution to this problem please tell.

    Thank you in advance!

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Table search for string

    Can you attached sample file? Put some mock data and expected results there.
    It will help to help.

    p.s. <PL ON>Pozdrawiam Slazaka. Oryginalny Bytomianin.</PL OFF>.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    09-04-2019
    Location
    Zabrze, Poland
    MS-Off Ver
    2016
    Posts
    6

    Re: Table search for string

    Attachment
    Attached Files Attached Files

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Table search for string

    Check attached file (Arkusz2).

    You can type (for ex) thomas label into 'search' then in column D you will get suggested names from your table and you can choose by double click particular company to show it in col. F
    To find out companies include you search phrase I've used :

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and drag down few rows (I've made 20)
    This is array formula so you have to accept it with Ctrl+Shift+Enter not just Enter ({} should appear at start and end).
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-04-2019
    Location
    Zabrze, Poland
    MS-Off Ver
    2016
    Posts
    6

    Re: Table search for string

    Works pretty good, thank you very much!

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Table search for string

    Happy to help.

+ 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] search for rows in table that contains all words from a string
    By moosmahna in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 04-24-2017, 03:53 AM
  2. Search a string for a text value from a table.
    By DigitalShaman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-21-2017, 08:58 AM
  3. [SOLVED] Search for text in string and return back known value using a Table
    By Chris McGlothen in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-28-2017, 01:05 PM
  4. Search for string within a table and all rows that contain the string
    By shoulddt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2016, 12:27 PM
  5. Search 'String' and tag accordingly using 'String table'
    By tms12 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-15-2011, 02:10 PM
  6. Search from string to lookup table
    By olsoniv in forum Excel General
    Replies: 11
    Last Post: 11-18-2010, 09:18 PM
  7. Filtering a Table using a search string
    By Stephen_NY in forum Excel General
    Replies: 1
    Last Post: 04-04-2010, 02:46 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