+ Reply to Thread
Results 1 to 5 of 5

Nested Search Formula - Need Help

  1. #1
    Registered User
    Join Date
    09-18-2014
    Location
    Lansdale, Pa
    MS-Off Ver
    2007 and 2010
    Posts
    7

    Nested Search Formula - Need Help

    HI Everyone,

    I'm in need of some help. I have to figure out a formula that can identify if a cell contains a string of text based on a list of prefixes found in another tab and then have the ability to populate a result from a corresponding cell found in the list tab. So to clarify, I will have two tabs. The first tab or data tab will contain a column of model numbers and various other data we need not be concerned with. The 2nd tab will have a list of of prefixes for the various model numbers with a corresponding price list associated with it. Basically, what I have to do is look at a model number found in the data tab, go into the price list tab and identify if that model number starts with the prefixes provided and if it does fill in the corresponding price list associated with that prefix. I have been playing with the below formula which uses the prefixes found in the price list tab and searches a cells string of text to identify if the cell contains the prefix. Right now it populates a true/false. If the value is true then I want to return the name of the price list associated with that prefix. One other issue I have is that some prefixes contain very similar detail. For instance, one of the prefixes I am identifying in WM and another is WMT. Now if I were to manually compare this to a model number found in the data tab I could easily identify if a model number begins with just a WM or if it has WMT. Right now the formula below will identify with WM and WMT. I hope I explained is correctly but just to be certain I included an attached example of what I am trying to do. I have to do this for thousands of lines of data so I hope we can figure out a solution. Thanks!


    =SUMPRODUCT(--ISNUMBER(SEARCH(Prefix,N3)))>0
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Nested Search Formula - Need Help

    You could use a UDF (ExtractCap) to extract the prefix and then use an index-match to return the list. Try this:

    Please Login or Register  to view this content.
    =IFERROR(INDEX('List Tab'!$B$2:$B$137,MATCH(extractcap(A2),'List Tab'!$A$2:$A$137,0)),"")

    Don't forget to enable macros on opening.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Nested Search Formula - Need Help

    Maybe this... PLR has 2 Lists. Put in Cell C2 and drag down

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

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: Nested Search Formula - Need Help

    Or try this ...

    =LOOKUP(2,1/COUNTIF(A2,'List Tab'!$A$2:AB$137&"*"),'List Tab'!$B$2:$B$137)

  5. #5
    Registered User
    Join Date
    09-18-2014
    Location
    Lansdale, Pa
    MS-Off Ver
    2007 and 2010
    Posts
    7

    Re: Nested Search Formula - Need Help

    This seems to work but I'm having trouble replicating it in my spreadsheet at work. Could you explain the portion of the formula to me? For instance, I'm not sure what the "2" is doing in the beginning of the formula. Is that referencing a column? Also, what is the purpose of the 1/COUNTIF? I'm not sure what the "1/" is doing in the formula or it's purpose. Additionally, why do you use a range of "$A$2:AB$137"? Why does it extend way beyond the list in my data which is only in columns A and B? And What does "&"*"" do? I feel like if I understood these sections I may be better able to modify this for my spreadsheet at work. Sorry to be a pain. I feel like a complete rookie with this one.

+ 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. Nested if or search vlookup etc. "Super Complex formula!"
    By samantanori in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-06-2015, 08:27 AM
  2. [SOLVED] Nested Search Formula
    By xXHeisenbergXx in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-04-2014, 01:30 AM
  3. [SOLVED] Nested IF AND SEARCH formula not working
    By dcdeez in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-11-2013, 06:40 AM
  4. Nested IF statement with multiple ISNUMBER(SEARCH) formula
    By mlester in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-08-2013, 12:40 PM
  5. Nested SEARCH or FIND formula query
    By SAsplin in forum Excel General
    Replies: 7
    Last Post: 07-15-2011, 06:00 AM
  6. Excel 2007 : Nested Search Formula
    By Broken85 in forum Excel General
    Replies: 6
    Last Post: 02-07-2011, 01:32 PM
  7. Nested IF(SEARCH)
    By scmllc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-19-2008, 12:42 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