+ Reply to Thread
Results 1 to 7 of 7

How may I lookup values based on a substring to match another value

  1. #1
    Registered User
    Join Date
    12-16-2016
    Location
    New York, USA
    MS-Off Ver
    2013
    Posts
    11

    How may I lookup values based on a substring to match another value

    Currently, I am using nested IF statements as shown below

    =IF(ISNUMBER(SEARCH("Think",D2)),"Lenovo",
    IF(ISNUMBER(SEARCH("Tough",D2)),"Panasonic",
    IF(ISNUMBER(SEARCH("EVO",D2)),"HP",
    IF(ISNUMBER(SEARCH("Mac",D2)),"Apple",
    IF(ISNUMBER(SEARCH("Sun",D2)),"Oracle",
    IF(ISNUMBER(SEARCH("Sparc",D2)),"Oracle",
    IF(ISNUMBER(SEARCH("HP",D2)),"HP",
    IF(ISNUMBER(SEARCH("Latitude",D2)),"Dell",
    IF(ISNUMBER(SEARCH("Optiplex",D2)),"Dell",
    IF(ISNUMBER(SEARCH("Proliant",D2)),"HP",
    IF(ISNUMBER(SEARCH("Precision",D2)),"Dell",
    IF(ISNUMBER(SEARCH("Wyse",D2)),"Dell",
    IF(ISNUMBER(SEARCH("Alienware",D2)),"Dell",
    IF(ISNUMBER(SEARCH("Aspire",D2)),"Acer",
    IF(ISNUMBER(SEARCH("Dimension",D2)),"Dell",
    IF(ISNUMBER(SEARCH("Gobook",D2)),"Itronix",
    IF(ISNUMBER(SEARCH("GD6000",D2)),"Itronix",
    IF(ISNUMBER(SEARCH("Inspiron",D2)),"Dell",
    IF(ISNUMBER(SEARCH("Lifebook",D2)),"Fujitsu",
    IF(ISNUMBER(SEARCH("Intellistation",D2)),"IBM",
    IF(ISNUMBER(SEARCH("NetVista",D2)),"IBM",
    "Unknown"))
    )))))))))))))))))))

    This gets too cumbersome after a while, also, I suspect its a drag on system resources. My file has over 80k rows
    Last edited by kzaveri19; 04-12-2017 at 04:48 PM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    16,518

    Re: Is there any easier way to do this?

    Attach a sample workbook. (NOT image)

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    12-16-2016
    Location
    New York, USA
    MS-Off Ver
    2013
    Posts
    11

    Re: Is there any easier way to do this?

    Please find attached
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    16,518

    Re: Is there any easier way to do this?

    See attached (one I made but same yours):

    in E2

    =INDEX($A$1:$A$21,SUMPRODUCT(--(ISNUMBER(SEARCH($B$1:$B$21,$C2))*ROW($B$1:$B$21))))
    Attached Files Attached Files
    Last edited by JohnTopley; 04-12-2017 at 04:15 PM.

  5. #5
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,653

    Re: Is there any easier way to do this?

    <..........>
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Registered User
    Join Date
    12-16-2016
    Location
    New York, USA
    MS-Off Ver
    2013
    Posts
    11

    Re: How may I lookup values based on a substring to match another value

    Hello Admin. Title has been updated

  7. #7
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,653

    Re: How may I lookup values based on a substring to match another value

    Similar to John's suggestion:

    A
    B
    C
    D
    E
    F
    1
    Product Name Vendor Keyword Vendor
    2
    EVO N610C HP B2: =INDEX(F:F, LOOKUP(999, ROW($E$2:$E$22)/ISNUMBER(SEARCH($E$2:$E$22, A2)))) Alienware Dell
    3
    Toughbook CF-29 Panasonic Aspire Acer
    4
    ThinkPad 600E Lenovo Dimension Dell
    5
    ThinkPad T420s Lenovo EVO HP
    6
    ThinkPad P70 Lenovo GD6000 Itronix
    7
    ThinkCentre M91p Lenovo Gobook Itronix
    8
    Toughbook CF-19 Panasonic HP HP
    9
    ThinkPad W530 Lenovo Inspiron Dell
    10
    ThinkPad 410 Lenovo Intellistation IBM
    11
    ThinkPad T420 Lenovo Latitude Dell
    12
    ThinkPad X200 Lenovo Lifebook Fujitsu
    13
    ThinkPad 410S Lenovo Mac Apple
    14
    ThinkCentre M90p Lenovo NetVista IBM
    15
    ThinkCentre M57 Lenovo Optiplex Dell
    16
    ThinkPad T400 Lenovo Precision Dell
    17
    ThinkCentre M91 Lenovo Proliant HP
    18
    ThinkCentre M92P Lenovo Sparc Oracle
    19
    ThinkPad T430s Lenovo Sun Oracle
    20
    EVO D510 HP Think Lenovo
    21
    Toughbook CF-30 Panasonic Tough Panasonic
    22
    Toughbook CF-53 Panasonic Wyse Dell

+ 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. Looking for an easier way
    By sweaterman in forum Excel General
    Replies: 4
    Last Post: 02-03-2015, 01:05 AM
  2. There's Got to be an Easier Way
    By Sprint54 in forum Excel General
    Replies: 7
    Last Post: 02-08-2006, 08:10 PM
  3. Easier Way to do it?
    By Kurt Barr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2006, 02:25 PM
  4. Is there an easier way?
    By wmaughan in forum Excel General
    Replies: 5
    Last Post: 12-27-2005, 07:10 PM
  5. [SOLVED] Easier way?
    By davegb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-09-2005, 02:50 PM
  6. An easier way ??
    By Fitty in forum Excel General
    Replies: 1
    Last Post: 10-08-2005, 06:05 PM
  7. [SOLVED] There has to be any easier way!!
    By mully in forum Excel - New Users/Basics
    Replies: 18
    Last Post: 08-13-2005, 08:05 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