+ Reply to Thread
Results 1 to 9 of 9

Searching for a text string in a list and returning a value

  1. #1
    Registered User
    Join Date
    11-02-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Searching for a text string in a list and returning a value

    I'm making offers on real estate properties and want to avoid making duplicate offers on the same property. I'd like some help searching each cell in green and locating the string of format "MLS # 4653962", then taking this value and searching each cell for the same string in the list in yellow. If found, a "yes" should be placed in the "already offered" column. The space in between the two lists can be used as the marker for new list versus old, rather than using green vs yellow. I realize the data could be delimited using spaces and a VLOOKUP done, but I'd like some help with some code that would be more robust if say, the data in the lists weren't symmetric and couldn't be easily space delimited. Thanks in advance for any help with this.
    Attached Files Attached Files
    Last edited by Panda2012; 11-02-2011 at 01:33 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Searching for a text string in a list and returning a value

    Hi Panda2012 and welcome to the forum.

    I think you can use a CountIf function. See the attached.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    11-02-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Searching for a text string in a list and returning a value

    Good afternoon Marvin,
    Thank you for the quick reply! That would be fine if the data format in the two lists was always identical, but let's just assume that at times the only part of the text in each cell that is always identical , is the "MLS # 4653962" string. Sometimes the databases from which I take the listings won't list the address and MLS# for the same property, in the same format.
    Last edited by Panda2012; 11-02-2011 at 01:17 PM.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Searching for a text string in a list and returning a value

    Not sure I have this the correct way round.

    In B2
    Please Login or Register  to view this content.
    Drag/Fill down yellow range.

    In B21
    Please Login or Register  to view this content.
    Drag/Fill down yellow range.

    Hope this helps.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Registered User
    Join Date
    11-02-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Searching for a text string in a list and returning a value

    Thanks to you both for the help.

  6. #6
    Registered User
    Join Date
    11-02-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Searching for a text string in a list and returning a value

    One more thing Marcol, could we make that reference to "$B$21:$B$24" in the first formula, a dynamic range? The size of the list in green will vary.

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Searching for a text string in a list and returning a value

    Hi,

    See Dynamic Named Ranges at http://www.beyondtechnology.com/geeks007.shtml
    Then use the Name of the range instead of your $B$21....

  8. #8
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Searching for a text string in a list and returning a value

    @ MarvinP

    In common with many links to sites that explain Dynamic Lists, that site uses the volatile function OFFSET().

    I find it more useful to use the non-volatile function INDEX()

    See this workbook
    Name:= MLS_Codes
    Refers to:=
    Please Login or Register  to view this content.
    In large worksheets this can make a very real difference to the operation of the workbook.
    The volatile method will recalculate every time anything is changed in the workbook.
    The price to pay is that the non-volatile method will take longer to open,("quasi-volatile"?), but that's nothing when weighed against the considerable saving in operation time.

    @ Panda2012
    Better, if the ranges are going to vary in height, to keep them in different columns or sheets.

    See the attached.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    11-02-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Searching for a text string in a list and returning a value

    Thanks for going over the Index method with us; I remember using the Offset method a long time ago.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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