+ Reply to Thread
Results 1 to 7 of 7

Transpose a single column to a single row with duplicates removed

  1. #1
    Registered User
    Join Date
    03-03-2011
    Location
    Beaumont, TX
    MS-Off Ver
    Excel 2011 Mac
    Posts
    25

    Transpose a single column to a single row with duplicates removed

    I am new to VBA coding and am trying to write a VBA code to transpose a single column to a single row with duplicates removed. This length of the list can vary.

    In column B contains
    1
    1
    2
    3
    4
    3

    I would like to transpose starting at "F1" and the row would look like this
    F1 G1 H1
    1 2 3

    What VBA code can accomplish this?

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Transpose a single column to a single row with duplicates removed

    If you have your data in 'A' column (data has to start from second row) you could use this macro:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Transpose a single column to a single row with duplicates removed

    May be you need to delete previous data that are in f1,g1, etc.:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  4. #4
    Registered User
    Join Date
    03-03-2011
    Location
    Beaumont, TX
    MS-Off Ver
    Excel 2011 Mac
    Posts
    25

    Re: Transpose a single column to a single row with duplicates removed

    Works good. Only 1 slight problem for some reason it is not copying A1 cell. If the column A has values as such
    1
    2
    1
    3
    4

    It will transpose to 2 3 4 and leaves out 1.
    Last edited by ggilzow; 06-07-2013 at 10:41 AM. Reason: Remove extra value

  5. #5
    Forum Contributor Obsessed's Avatar
    Join Date
    05-22-2013
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 365
    Posts
    215

    Re: Transpose a single column to a single row with duplicates removed

    Try, Assuming column B:

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    03-03-2011
    Location
    Beaumont, TX
    MS-Off Ver
    Excel 2011 Mac
    Posts
    25

    Re: Transpose a single column to a single row with duplicates removed

    Thank you Obsessed this will work.

    Thank you Antonio for your help.


  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Transpose a single column to a single row with duplicates removed

    Another one

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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