+ Reply to Thread
Results 1 to 3 of 3

need to merge cells in column B based on data in column A

  1. #1
    Registered User
    Join Date
    08-08-2012
    Location
    California, United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question need to merge cells in column B based on data in column A

    I need a way to automate a merging of information of a group of cells in a column based on them having the same value in the adjacent column:

    Basically I need this:

    Part OEM
    CLS1001 OEM1
    CLS1001 OEM2
    CLS1002 OEM4
    CLS1002 OEM5

    To become this:

    Part OEM
    CLS1001 OEM1/OEM2
    CLS1002 OEM4/OEM5

    There are many thousands of lines in the file, so any manual way seems impractical. Any help someone here can give me would be appreciated.

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: need to merge cells in column B based on data in column A

    Pivot table?

    Stick 'em both in Row Labels, first "Part" and then "Manufacturer". It's not exactly what you want in terms of layout but merging text strings (like OEM names or whatever) is usually a lot of trouble, especially to undo.

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: need to merge cells in column B based on data in column A

    Try this code
    Please Login or Register  to view this content.
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
    Choose Insert | Module
    Where the cursor is flashing, choose Edit | Paste

    To run the Excel VBA code:
    Choose View | Macros
    Select a macro in the list, and click the Run button
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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