+ Reply to Thread
Results 1 to 6 of 6

Serch be fragment of text (Vloocup ? macro ?)

  1. #1
    Registered User
    Join Date
    06-18-2013
    Location
    Lithuania Kaunas
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    98

    Question Serch be fragment of text (Vloocup ? macro ?)

    hello my friends
    this function I manage to select the result in terms of the objectives of the product code. and I need to search for a piece of the product code. The results will be the same in accordance with fragments but not the exact code.

    You will understand everything looked in my file
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Serch be fragment of text (Vloocup ? macro ?)

    Hi,

    maybe in G25

    Please Login or Register  to view this content.
    Hope it helps
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Serch be fragment of text (Vloocup ? macro ?)

    hi there. do add a 0 or FALSE at the end of your VLOOKUP formula to find an exact match. you're playing with fire to use approximate match (without the 0 or FALSE). you can do a google search on how VLOOKUP with approximate match works if you're interested. so your G4 formula should be:
    =VLOOKUP(E3;B2:C15;2;0)

    so everything beginning with KSO is 13? otherwise, how does the formula know which one to pick? you can still use the same formula. the asterisk you input in F25 serves as a wildcard:
    =VLOOKUP(F25;$C$25:$D$37;2;0)
    if you simply put in KSO in F25, then:
    =VLOOKUP(F25&"*";$C$25:$D$37;2;0)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    06-18-2013
    Location
    Lithuania Kaunas
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    98

    Re: Serch be fragment of text (Vloocup ? macro ?)

    Quote Originally Posted by CANAPONE View Post
    Hi,

    maybe in G25

    Please Login or Register  to view this content.
    Hope it helps
    I do not need to sum values I need only one value

  5. #5
    Registered User
    Join Date
    06-18-2013
    Location
    Lithuania Kaunas
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    98

    Re: Serch be fragment of text (Vloocup ? macro ?)

    Quote Originally Posted by benishiryo View Post
    hi there. do add a 0 or FALSE at the end of your VLOOKUP formula to find an exact match. you're playing with fire to use approximate match (without the 0 or FALSE). you can do a google search on how VLOOKUP with approximate match works if you're interested. so your G4 formula should be:
    =VLOOKUP(E3;B2:C15;2;0)

    so everything beginning with KSO is 13? otherwise, how does the formula know which one to pick? you can still use the same formula. the asterisk you input in F25 serves as a wildcard:
    =VLOOKUP(F25;$C$25:$D$37;2;0)
    if you simply put in KSO in F25, then:
    =VLOOKUP(F25&"*";$C$25:$D$37;2;0)
    Please Login or Register  to view this content.
    This option is perfect for me. but if my KSO have diferent value and i want take the bigest. ?
    Last edited by arn0ldas; 02-06-2014 at 07:41 AM.

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Serch be fragment of text (Vloocup ? macro ?)

    it will not be a VLOOKUP, but an array formula then. the asterisk will be useless in this case. if it's without the asterisk, try:
    =MAX(IF(LEFT(C25:C37,LEN(F25))=F25,D25:D37))

    if it's with the asterisk, the formula needs to remove it:
    =MAX(IF(LEFT(C25:C37,LEN(F25)-1)=LEFT(F25,LEN(F25)-1),D25:D37))

    if you don't know whether or not there will be an asterisk:
    =MAX(IF(LEFT(C25:C37,LEN(F25)-IF(ISNUMBER(FIND("*",F25)),1,0))=LEFT(F25,LEN(F25)-IF(ISNUMBER(FIND("*",F25)),1,0)),D25:D37))

    all these 3 formulas...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

+ 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. I need a code to serch text in smart art in excel and where found highlight
    By ROHAN999 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-12-2013, 01:05 PM
  2. Serch list using Vlookup will only serch half way down the left column
    By Debbievv in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2013, 10:26 AM
  3. Filter responsive count of entries with a given fragment of text
    By Seed1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-25-2013, 08:27 AM
  4. Analysing an HTML fragment
    By mozmanmozman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-16-2012, 08:55 AM
  5. Fragment Files
    By RohanSewgobind in forum Excel General
    Replies: 1
    Last Post: 04-23-2006, 05:10 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