+ Reply to Thread
Results 1 to 2 of 2

VLookup with multiple key searches in one cell

  1. #1
    Registered User
    Join Date
    09-07-2017
    Location
    New York
    MS-Off Ver
    2016
    Posts
    7

    VLookup with multiple key searches in one cell

    Hi,

    I have a column called "Line item(s)" that in each cell contains multiple values separated by ALT+Enter, I would like for the adjacent column to lookup each line item (as an array?) and return the description in the same format; separated by ALT+Enter.

    I'll explain a little why i want is set up this way. So i have expenses that sometimes pertain to multiple line items (split equally for simplicity), so i want to put in the expense info (Price, etc.) and then enter all the items it pertains to, so that i can pull a report and see how much i spent on each item.*
    I've attached an example workbook. the last tab is what i want it to look like.

    Ideally id want to have each line item on a separate row, with a parent child relationship... but i believe that's not the proper way to work with. I might be wrong.

    If anyone has a better idea of how to do this. I'd appreciate it.
    Attached Files Attached Files

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: VLookup with multiple key searches in one cell

    Assuming, at this point, you're just focused on populating column C the complexity will depend on

    a) your XL version (i.e. are you running 2016 per profile, or later version?)
    b) max no of elements in any given cell

    if, a) you're running O365 or 2019 things are much simpler... as they have nice Text Array functions that earlier versions do not (e.g. TEXTJOIN, CONCAT)
    if you are on 2016 then b) becomes important as you would need to repeat the calcs per element, e.g.:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    the feasibility of which is dependent upon how many items you need to account for, the above only accounts for 3 elements

    so, in summary, if running 2016 and you have large numbers of elements in a cell then I would suggest you implement a UDF.

    note : for Col D I'd suggest:

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

+ 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. Replies: 7
    Last Post: 10-17-2019, 12:00 PM
  2. Replies: 3
    Last Post: 10-25-2017, 08:47 AM
  3. Vlookup that searches for text within a cell that is listed in a table arrary
    By rossco47769 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-05-2014, 06:42 AM
  4. Countif formula for multiple searches and answers in one cell
    By RTrac in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-11-2012, 05:00 PM
  5. Excel 2007 : Specifying how VLOOKUP searches a column?
    By budakhan81 in forum Excel General
    Replies: 8
    Last Post: 08-20-2011, 08:29 PM
  6. [SOLVED] Getting valid web searches and avoiding sites that contaminate web searches
    By David McRitchie in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-12-2006, 10:10 PM
  7. [SOLVED] help with vlookup, wildcards, multiple searches
    By mike in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-14-2006, 12:25 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