+ Reply to Thread
Results 1 to 5 of 5

Find Function with List / Use OR Function to Find

  1. #1
    Registered User
    Join Date
    12-10-2018
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    2

    Find Function with List / Use OR Function to Find

    I am trying to use the FIND function to search through text within a list (Column D) and every time there is an exact match with any text from that list I want the entire string of the text to be returned in Column C. Currently my formula will only work for the first cell of the list that I am trying to search through and will not search through an entire list. As you can see the text in C2 is pulled in properly, but that is only because cell B2 has -AA- in the text. If I change the contents in cell B2 from -AA- to -AF- it will not return the text anymore. Is there a way to change my formula so that it searches the entire list in Column D and every time it finds a match from the cell in B it will return the entire string in the cell next to it in Column C?

    Here is the formula I am using: =IFERROR(TRIM(MID(SUBSTITUTE($B2," ",REPT(" ",99)),MAX(1,FIND(D2:D4,SUBSTITUTE($B2," ",REPT(" ",99)))-50),99)),"NO SITE PLAN")

    2018-12-10_9-20-47.png

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Find Function with List / Use OR Function to Find

    Welcome to the Forum nickyd8855!

    This part of your formula

    FIND(D2:D4

    will not work the way you think it will. It will not run through all the cells to check for a match. It will only check a single value; when you give it a range like that it will only use the upper-left cell in the range.

    However, I think this will work if you enter your same formula as an array formula. First change D2:D4 to D$2:D$4 (or whatever row number you want to use). Select C2, hit F2, then press CTRL+SHIFT+ENTER to enter the array formula. You have done it correctly if the formula in the formula box has {braces} around it. You cannot type in the braces; they are just an indicator that it is an array formula. Then copy down to all rows.

    If this does not work then please attach your Excel file. An image attachment has limited value. Attaching the Excel file is easier than taking a screenshot first and then attaching that. The paper clip icon does not work for attachments. To attach a file, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    12-10-2018
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Find Function with List / Use OR Function to Find

    Hey Jeff, I tried the CTRL + SHFT + ENTER to turn it into an array but I didn't have any luck. Can you take a look at the attached Excel file to see if you are able to get it to work. Also, this is just a small subset of the 150K rows that I wanted to have this applied to. So please let me know if you need all of the actual data. Thanks Jeff I appreciate your assistance!
    Attached Files Attached Files

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Find Function with List / Use OR Function to Find

    Yeah, I tried something like this on a small sample and didn't get it to work. I believe is it possible with a somewhat more complex formula. I (or someone else) will have a look.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: Find Function with List / Use OR Function to Find

    Please try at C2 and copy down

    =IF(COUNT(INDEX(FIND($D$2:$D$8,B2),)),TRIM(LEFT(SUBSTITUTE(MID(B2,FIND("_",B2)+3,50)," ",REPT(" ",50)),50)),"NO SITE PLAN")

+ 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. VBA Function find closest date from list
    By Gero92 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-15-2018, 07:51 PM
  2. [SOLVED] Function to find if a string contains any item from a list
    By ShawnW in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-23-2013, 04:48 PM
  3. VBA Find Function from a List
    By ph00086 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2013, 04:20 AM
  4. Can't find List Function
    By ddub25 in forum Excel General
    Replies: 6
    Last Post: 07-14-2009, 02:37 PM
  5. [SOLVED] Find in list function
    By jrup in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 08-22-2005, 08:05 PM
  6. i need a function to find the highest value in a list
    By Melani in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-14-2005, 02:06 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