+ Reply to Thread
Results 1 to 3 of 3

Add new "identifier" column with joined results from multiple rows for same customer ID

  1. #1
    Registered User
    Join Date
    08-01-2012
    Location
    Anyville, Anywhere
    MS-Off Ver
    Excel 2007
    Posts
    11

    Add new "identifier" column with joined results from multiple rows for same customer ID

    So embarrassed I can't figure this out...I've tried filters, IFs, concatenate, pivot tables...nothing seems to work.

    Assume I have a two column spreadsheet:

    Column A is "Customer ID"
    Column B is "Customer Type"

    This spreadsheet is tens of thousands of rows long. There are only two possible entries for "Customer Type": Apples or Bananas. Every row has one entry per Customer ID, but only one entry. I want to add a third column that helps me understand whether the customer has "Apples" or "Apples/Bananas". I will never have a situation where a customer has just "Bananas." Some customers have "Apples" for every row. Some have one or more instances of "Bananas". But every customer has at least one instance of "Apples."

    Here's an example:

    Customer ID Customer Type
    1001 Apples
    1001 Apples
    1002 Apples
    1002 Bananas
    1003 Apples
    1003 Apples
    1003 Apples
    1003 Bananas
    1003 Apples

    What I want is the third column called "Customer Preference" that reflects the following:

    Customer ID Customer Type Customer Preference
    1001 Apples Apples
    1001 Apples Apples
    1002 Apples Apples/Bananas
    1002 Bananas Apples/Bananas
    1003 Apples Apples/Bananas
    1003 Apples Apples/Bananas
    1003 Apples Apples/Bananas
    1003 Bananas Apples/Bananas
    1003 Apples Apples/Bananas

    Thank you SO MUCH for your help.

  2. #2
    Forum Contributor
    Join Date
    12-22-2010
    Location
    Rio, Brazil
    MS-Off Ver
    Excel 2010, 2016
    Posts
    209

    Re: Add new "identifier" column with joined results from multiple rows for same customer I

    Try this formula in C2 copied down

    ="Apples"&IF(COUNTIFS(A:A,A2,B:B,"Bananas"),"/Bananas","")

    Hope this helps
    Marcelo Branco

  3. #3
    Registered User
    Join Date
    08-01-2012
    Location
    Anyville, Anywhere
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Add new "identifier" column with joined results from multiple rows for same customer I

    Thanks a ton! Worked perfectly!
    Can I trouble to explain what the COUNTIFS parameters are doing? I'd really like to learn how to apply this to other data sets I have.

    This was so helpful. Can't thank you enough!

+ 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] Copy multiple rows that contain a certain "name" in column "A" then paste it into new work
    By rschlot2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2013, 02:25 PM
  2. Replies: 2
    Last Post: 06-06-2013, 12:45 PM
  3. How to Get Vlookup Results when der are multiple rows with the same "Lookup Value"
    By Sanjaysh277 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-20-2013, 12:17 PM
  4. Change "Parent" cell based on results of multiple "Children" cells
    By ccowman in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 12-14-2012, 02:33 AM
  5. Replies: 2
    Last Post: 09-29-2010, 03:28 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