+ Reply to Thread
Results 1 to 8 of 8

Possible to disassemble a Column?

  1. #1
    Registered User
    Join Date
    03-14-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    17

    Possible to disassemble a Column?

    Hi all,
    Is it possible to disassemble a column?

    In an effort to make two spreadsheet into one same format, i came upon such a problem:
    I need to make
    ModelA - Red
    ModelB - Red
    ModelA - Blue
    ModelA - Green

    Into
    Column 1
    *******
    ModelA
    ModelB
    ModelA
    ModelA


    Column 2
    *******
    Red
    Red
    Blue
    Green

    To put it short, i need to replace the "model - color" value with the model and then insert the color into a new column, my experiments with the macro thus far are unsuccessful as given my level of experience in Excel VBA, I have no idea what code to put even when I have a clear idea what to do

    And to add the difficulty of the task, my manager wants the macro to be unspecific, as there might be new models in the future and he doesn't want to go through the trouble of writing another list of macro (possible one macro for each color, if things work like how i wanted them to be in my experiments) for the new models, so the macro have to work without referencing the model name, only the color

    Is it possible to create a macro that does such a task?

    Any help are greatly appreciated. Thank you very much.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Possible to disassemble a Column?

    the trick is to find a common "separator" and in this case it is -
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Possible to disassemble a Column?

    Same thing but with VBA using the Split function..

    See attached.. result shown on Sheet2.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,573

    Re: Possible to disassemble a Column?

    VBA no loop.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-14-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Possible to disassemble a Column?

    Wow that was some quick response!
    Thanks both of you, your solution solved my problem easily, thank you very much! :D

  6. #6
    Registered User
    Join Date
    03-14-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Possible to disassemble a Column?

    Ah, didn't refresh the page while i was studying the first two solution, thanks you as well, jindon

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,573

    Re: Possible to disassemble a Column?

    No problem and thanks for the rep.

  8. #8
    Registered User
    Join Date
    03-14-2014
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Possible to disassemble a Column?

    You're welcome :D

+ 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] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel General
    Replies: 4
    Last Post: 04-07-2012, 09:14 AM
  2. [SOLVED] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel General
    Replies: 5
    Last Post: 04-06-2012, 12:02 PM
  3. [SOLVED] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 04-06-2012, 11:19 AM
  4. [SOLVED] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-06-2012, 11:18 AM
  5. [SOLVED] Delete Cell Numbers of Column B From Column A (Column B Small and Column A too big)
    By it_electronics2000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-06-2012, 11:13 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