+ Reply to Thread
Results 1 to 9 of 9

INDEX MATCH comma separated values in one cell

  1. #1
    Registered User
    Join Date
    02-17-2014
    Location
    Florida
    MS-Off Ver
    Excel 2016
    Posts
    62

    INDEX MATCH comma separated values in one cell

    Hello,

    I need, what I think is, a complex formula to help return financial data. I'm trying to pull dollar values from a financial sheet with an INDEX MATCH formula and am having difficulty when the "Lookup Value" cell has more than one value in it.

    I look at an alternate sheet to get the dollar amount of a device, which, when it's just one, works great. If the cell containing the "lookup value" contains multiple items (separated by a comma), I'm not sure how to do this.

    Sheet 1 (Financial Data)
    Col A Col B Col C Col D
    Header Row 1 Prod Line Item# Std Cost Avg Selling Price
    Row 2 BOK TRAVEL $3.39 $4.85
    Row 3 BOK SPACE $4.22 $5.23
    Row 4 BOK BOAT $2.92 $5.59
    Row 5 BOK CAR $3.14 $5.26


    Sheet 2 (Results Sheet)
    Col A Col B Col C
    Row 1 Item#'s Avg. Std Cost Avg. Selling Price
    Row 2 TRAVEL, SPACE (Need the average Std cost of both (TRAVEL and SPACE combined)) (Need the average selling price of both (TRAVEL and SPACE combined))


    The user enters in the data in Col A / Row 2 ("Item(s) in Sheet 2). I'm using INDEX MATCH currently and it works great with one "Item" in the Item's column. I just can't figure out how to get it to reconcile two items that are comma separated in Col A on sheet 2.

    Thank you all in advance!!
    John

  2. #2
    Registered User
    Join Date
    08-30-2016
    Location
    Edmonton, Canada
    MS-Off Ver
    2016 64b
    Posts
    92

    Re: INDEX MATCH comma separated values in one cell

    Can you copy this into a workbook.

  3. #3
    Registered User
    Join Date
    02-17-2014
    Location
    Florida
    MS-Off Ver
    Excel 2016
    Posts
    62

    Re: INDEX MATCH comma separated values in one cell

    See example workbook attached.

    Test.xlsx

  4. #4
    Valued Forum Contributor
    Join Date
    12-14-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    439

    Re: INDEX MATCH comma separated values in one cell

    Try this array formula in B2 and then copy B2 to C2
    Please Login or Register  to view this content.
    Note that finish with Ctrl + Shift + Enter to use a formula in array mode

  5. #5
    Registered User
    Join Date
    02-17-2014
    Location
    Florida
    MS-Off Ver
    Excel 2016
    Posts
    62

    Re: INDEX MATCH comma separated values in one cell

    WORKS PERFECT!! Thank you very much.

  6. #6
    Registered User
    Join Date
    02-17-2014
    Location
    Florida
    MS-Off Ver
    Excel 2016
    Posts
    62

    Re: INDEX MATCH comma separated values in one cell

    Any way to change this into an AVERAGEIF to incorporate the rejection of any $0 or blanks? I've tried a few iterations but can't get the formula correct.

    I try it this way:
    Please Login or Register  to view this content.
    But get a #VALUE! error

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: INDEX MATCH comma separated values in one cell

    Here is another approach if you are willing/able to use a helper column in your data sheet (I used col E)
    Date E2=MATCH("*"&B2&"*",'Results Sheet'!$A$2,0)
    copied down

    Then for the calcs...
    =AVERAGEIF('Financial Data'!$E$2:$E$5,1,'Financial Data'!C$2:C$5)
    copied down
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Registered User
    Join Date
    02-17-2014
    Location
    Florida
    MS-Off Ver
    Excel 2016
    Posts
    62

    Re: INDEX MATCH comma separated values in one cell

    Thanks FDibbins - That's a great alternative!

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: INDEX MATCH comma separated values in one cell

    Happy to help

+ 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. [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
  2. 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
  3. Doing a look up on a cell with comma separated values
    By floragraga in forum Excel General
    Replies: 3
    Last Post: 05-10-2017, 04:35 PM
  4. Replies: 5
    Last Post: 02-18-2017, 11:21 AM
  5. INDEX & MATCH multiple rows to return comma separated cell
    By sifuchi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-18-2015, 04:36 PM
  6. Match a Value from a single-cell, comma separated list
    By secondchild12 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-24-2014, 06:16 PM
  7. [SOLVED] Macro to match values in cells separated by semicolon and comma
    By Ale84 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2013, 11:00 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