+ Reply to Thread
Results 1 to 6 of 6

Vlookup trying to pull value or values from a cell where values are separated by a comma

  1. #1
    Registered User
    Join Date
    11-02-2021
    Location
    Miami, FL
    MS-Off Ver
    2016 Standard
    Posts
    3

    Vlookup trying to pull value or values from a cell where values are separated by a comma

    In one column a cell may have one value or multiple values in it separated by a comma. I am trying to use a wildcard to pull the value or values into a cell.

    Workbook attached for review:

    Sheet "Definitions"

    Column C - this is where I want the value or values written
    Column D - lookup value

    Sheet "Group Plan Table"

    Column C - this is the name I want written into Column C of the "Definitions" sheet
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,511

    Re: Vlookup trying to pull value or values from a cell where values are separated by a com

    Might be helpful if you show us what your expected results look like on a couple of records.

    BSB

  3. #3
    Registered User
    Join Date
    11-02-2021
    Location
    Miami, FL
    MS-Off Ver
    2016 Standard
    Posts
    3

    Re: Vlookup trying to pull value or values from a cell where values are separated by a com

    Sorry for not posting what the expected value would be.

    In Cell A3, I would expect the value D116 and value D176 as 115 maps to D116 on the Group Plan sheet and 152 maps to D176 on the Group Plan sheet

    Capture.PNG

    Capture1.PNG

    I would expect it to show

    Capture2.PNG

    Thank you for your help.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,738

    Re: Vlookup trying to pull value or values from a cell where values are separated by a com

    Hello the1trugr81 and Welcome to Excel Forum.
    As the values in column D are numbers column E converts the numbers to text using: =TEXT(D2,"#,#")
    Columns F:H parse the text for use in looking up the group plan codes using: =IFERROR(VLOOKUP(--TRIM(MID(SUBSTITUTE($E2,",",REPT(" ",LEN($E2))),(COLUMN(A:A)-1)*LEN($E2)+1,LEN($E2))),'Group Plan Table'!$A$2:$C$310,3),"")
    Note that columns E:H may be moved and/or hidden for aesthetic purposes.
    As the 2016 version doesn't support TEXTJOIN, Column C displays the group plan codes using: =F2&IF(G2<>"",", "&G2,"")&IF(H2<>"",", "&H2,"")
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    11-02-2021
    Location
    Miami, FL
    MS-Off Ver
    2016 Standard
    Posts
    3

    Re: Vlookup trying to pull value or values from a cell where values are separated by a com

    Thank you JeteMc!! This was exactly what I was looking for.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,738

    Re: Vlookup trying to pull value or values from a cell where values are separated by a com

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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. How to remove duplicate values from comma separated values in a cell ?
    By Sravya22 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-30-2021, 11:05 AM
  2. Vlookup name, create comma separated list of Values
    By Jonathan2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-25-2020, 02:14 AM
  3. Replies: 4
    Last Post: 12-01-2020, 01:20 PM
  4. vlookup multiple values in one cell separated by comma
    By dell001 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-03-2019, 01:34 AM
  5. [SOLVED] Sum values using vlookup with lookup cell containing comma separated values
    By tmalito in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-08-2019, 10:14 AM
  6. [SOLVED] Vlookup or Index to search and return multiple values in one cell separated by a comma
    By Trnecessary in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 10-17-2018, 12:59 PM
  7. Vlookup or Index to search and return multiple values in one cell separated by a comma
    By Trnecessary in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-17-2018, 10:37 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