+ Reply to Thread
Results 1 to 6 of 6

Perform search & return complete text out of a range but not the full cell content

  1. #1
    Registered User
    Join Date
    02-18-2015
    Location
    United States
    MS-Off Ver
    2013
    Posts
    25

    Perform search & return complete text out of a range but not the full cell content

    I have a form that I have been struggling with and the types of excel built in functions haven't achieved what I want. This is want; I want to include a string query from a textbox and if the text partially matches; it will add it to the listbox as a complete text. I have this:

    Please Login or Register  to view this content.
    Please share your ideas. Thanks!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Perform search & return complete text out of a range but not the full cell content

    Can't you just use this?
    Please Login or Register  to view this content.
    PS Might not be a good idea using val for a variable name, could get confused with VBA's Val function.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    02-18-2015
    Location
    United States
    MS-Off Ver
    2013
    Posts
    25

    Re: Perform search & return complete text out of a range but not the full cell content

    no; my intent is to get just a text that met the partial content (substring), not the entire cell content as you describe.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Perform search & return complete text out of a range but not the full cell content

    Do you mean a single word?

    If you don't how would you determine what part of the text to take from the cell?

  5. #5
    Registered User
    Join Date
    02-18-2015
    Location
    United States
    MS-Off Ver
    2013
    Posts
    25

    Re: Perform search & return complete text out of a range but not the full cell content

    If you look at the array "keyword"; it holds 4 prefixes; the If statement is a value from a textbox that is the designated target. For instance if the entered part matches column A2, then it will move over to V2 and start looking for the prefix value in the array. The reason these are prefixes is because they can be different numbers but will always start with those prefixes; I want to be able to extract the rest of those numbers and populate them in the listbox.

    I need help in determining how can the rest of the word can be extracted; could be something like instr(Range("V" & i).value, letterHolder + 1, " ") stating that it will stop when a 'space' is found. I'm just not sure how that can be achieved by getting those letters together to form the word/text.
    Last edited by aguilarpro; 10-25-2017 at 02:45 PM. Reason: added more detail

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Perform search & return complete text out of a range but not the full cell content

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED, scroll down and click Manage Attachments.

+ 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. Search and Match partial text string to full text and return a value
    By homa5424 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-09-2017, 10:52 AM
  2. Formula to find and return text string within a cell full of text strings
    By LightingPop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2013, 11:45 PM
  3. [SOLVED] search text of cell in a range and return the contents in the corresponding column
    By kumail in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-18-2013, 06:42 PM
  4. Search Text of Cell in a range and return the contents
    By knowing in forum Excel General
    Replies: 8
    Last Post: 11-19-2012, 08:57 AM
  5. Replies: 3
    Last Post: 10-03-2012, 03:09 AM
  6. Replies: 4
    Last Post: 05-12-2011, 02:25 PM
  7. Search Text of Cell in a range and return the contents
    By shanipk82 in forum Excel General
    Replies: 3
    Last Post: 11-26-2010, 01:34 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