+ Reply to Thread
Results 1 to 9 of 9

Table format Conversion

  1. #1
    Registered User
    Join Date
    02-09-2010
    Location
    Dayton
    MS-Off Ver
    Excel 2007
    Posts
    23

    Table format Conversion

    I have a table with two columns "code" and "dates". There are duplicates in the code column but each duplicate has an corresponding unique date. I want to eliminate the duplicate codes and have the unique date values put next to each other under a single row for a given code word.

    Example:
    as 98
    as 76
    as 76
    bc 54
    de 32
    rf 54

    I want a table as:

    as 98 76 56
    bc 54
    de 32
    rf 54

    I have also attached a sample sheet for further reference. Any help is appreciable.

    Thanks
    Attached Files Attached Files
    Last edited by ramanan256; 09-22-2011 at 05:57 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Table format Conversion

    Several ways to do this, here is one:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-09-2010
    Location
    Dayton
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Table format Conversion

    it pops up

    run-time error '13':
    Type mismatch

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Table format Conversion

    Hello ramanan256,

    Here is another approach. This assume the data starts in cell "A2" of the active sheet. You can change the starting cell if you need to. It is marked in bold text below.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Registered User
    Join Date
    02-09-2010
    Location
    Dayton
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Table format Conversion

    @ stephen

    Thanks for your reply, it did really help me out but It shows the above error only when the code starts with the symbol " ~ " what shall I do for it ..

    @leith

    Thanks for your time...I will try it out...

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Table format Conversion

    hi, ramanan256, option without external libraries, run code "test"
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-09-2010
    Location
    Dayton
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Table format Conversion

    @Leith

    The code converts the data in the format that I want but put all the numbers in a single cell. i want them in different cells. I have attached the format that I am looking for in the example sheet. Could you tel me how do I do that??

    Thanks for the help leith

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: Table format Conversion

    Hello ramanan256,

    Oops, you did ask for that. Here is the corrected code. The changes are in bold text.

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    02-09-2010
    Location
    Dayton
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Table format Conversion

    Thanks leith appreciate your efforts..

    Thanks everybody !!

+ 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