+ Reply to Thread
Results 1 to 5 of 5

Combine Text Fields within Column for Duplicate Entries in Adjacent Column

  1. #1
    Registered User
    Join Date
    08-09-2013
    Location
    Chambersburg, PA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Exclamation Combine Text Fields within Column for Duplicate Entries in Adjacent Column

    Hello,

    Relative newb here. I already apologize for not explaining this correctly, but I'll do my best! I need to combine text fields from within a column for duplicate entries in an adjacent column. BELOW, the first two columns show what I have and the third column shows my desired product.

    Product - Location - ALL Locations
    apple - shelf 1 - shelf 1
    banana - shelf 2 - shelf 2
    yogurt - shelf 3 - shelf 3 and shelf 4
    yogurt - shelf 4 - shelf 3 and shelf 4

    In other words, when a product is on more than one shelf, I need to list each shelf in a single cell.

    I can't use a PIVOT table for my application because I will be linking this to an ACCESS database later via the common field (product), and want to show the combined field (ALL Locations) for each product.

    I greatly appreciate any help!

    Thanks,

    Alex

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Combine Text Fields within Column for Duplicate Entries in Adjacent Column

    Quote Originally Posted by ANKRULL View Post
    Hello,

    Relative newb here. I already apologize for not explaining this correctly, but I'll do my best! I need to combine text fields from within a column for duplicate entries in an adjacent column. BELOW, the first two columns show what I have and the third column shows my desired product.

    Product - Location - ALL Locations
    apple - shelf 1 - shelf 1
    banana - shelf 2 - shelf 2
    yogurt - shelf 3 - shelf 3 and shelf 4
    yogurt - shelf 4 - shelf 3 and shelf 4

    In other words, when a product is on more than one shelf, I need to list each shelf in a single cell.

    I can't use a PIVOT table for my application because I will be linking this to an ACCESS database later via the common field (product), and want to show the combined field (ALL Locations) for each product.

    I greatly appreciate any help!

    Thanks,

    Alex
    Would you be happy with VBA function?
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Registered User
    Join Date
    08-09-2013
    Location
    Chambersburg, PA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Combine Text Fields within Column for Duplicate Entries in Adjacent Column

    Hi! I appreciate your response. I've never used VBA but I'd be open to learning if you have a function to do this. Any suggestions on how to get started? Again, I apologize for being such a newb? I'm well practiced at excel functions (medium complexity), have been making macros (not writing) for about a year, and understand some basic programming language.

    Thanks for your help!

    Alex

  4. #4
    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,938

    Re: Combine Text Fields within Column for Duplicate Entries in Adjacent Column

    Hi and welcome to the forum

    How many total possible locations could there be?
    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

  5. #5
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: Combine Text Fields within Column for Duplicate Entries in Adjacent Column

    Press Alt+F11
    Enter this code as modul:
    Please Login or Register  to view this content.
    Then use this formula in C2 (confirm Control+Shift+Snter)
    =IF(A2="","",SUBSTITUTE(AConcat(IF($A$2:$A$10=A2,","&$B$2:$B$10,"")),",","",1)) and drag down

    Shelf.xls
    Last edited by RobertMika; 08-11-2013 at 01:04 AM.

+ 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: 0
    Last Post: 06-14-2012, 12:38 PM
  2. Combine text in multiple cells if adjacent column is blank
    By problematic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2012, 01:52 PM
  3. Locking column entries to an adjacent linked column
    By Steeljaw in forum Excel General
    Replies: 1
    Last Post: 01-23-2006, 06:50 PM
  4. Replies: 0
    Last Post: 03-09-2005, 06:47 AM
  5. Using COUNTIF to count column entries if adjacent column contains data
    By johnfullerroot in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-09-2005, 05:43 AM

Tags for this Thread

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