+ Reply to Thread
Results 1 to 9 of 9

Need help making VBA to transpose and delete duplicates

  1. #1
    Registered User
    Join Date
    09-18-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    2013
    Posts
    33

    Need help making VBA to transpose and delete duplicates

    Sample Workbook.xlsxI need a VBA that can delete redundancies and transfer the second score (if there is one) over to another column. Here is an example.

    Before_Macro

    Name___________ID_____Loc____Score
    Mark_B.________1223___NY_____3
    Mark_B.________1223___NY_____2
    Anthony_M._____3200___LA_____1
    Anthony_M._____3200___LA_____4
    Ben_A._________1101___HO_____2
    Ben_A._________1101___HO_____3
    Elizabeth_S.___2600___NY_____2
    Christina_G.___4206___LA_____3
    Christina_G.___4206___LA_____6
    Daniel_F.______9880___NY_____3


    After_Macro

    Name___________ID_____Loc____Score_1___Score_2
    Mark_B.________1223___NY_____3_________2
    Anthony_M._____3200___LA_____1_________4
    Ben_A._________1101___HO_____2_________3
    Elizabeth_S.___2600___NY_____2___
    Christina_G.___4206___LA_____3_________6
    Daniel_F.______9880___NY_____3



    Please help!
    Last edited by pluqk; 11-24-2014 at 04:18 PM. Reason: Added Sample Workbook

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Need help making VBA to transpose and delete duplicates

    Please post a sample workbook.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Need help making VBA to transpose and delete duplicates

    try
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    09-18-2014
    Location
    Los Angeles, CA
    MS-Off Ver
    2013
    Posts
    33

    Re: Need help making VBA to transpose and delete duplicates

    that worked amazingly well, thank you

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Need help making VBA to transpose and delete duplicates

    Late entry ... alternative approach

    Please Login or Register  to view this content.

    Regards, TMS

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need help making VBA to transpose and delete duplicates

    And yet another

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Need help making VBA to transpose and delete duplicates

    Posts #3 and #6, truly impressive. Sadly, there's no way on God's earth that I could understand, explain, replicate or maintain those routines. Think I'll stick with the basic stuff. I'm not going to be developing apps for OS or Android any time soon either

    Edit: changed Post #5 (mine) to read Post #6 (xladept's) as per Post #8

    @xladept: no, seriously, not a clue.
    Last edited by TMS; 11-24-2014 at 08:50 PM.

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need help making VBA to transpose and delete duplicates

    @ Trevor - Post #5 is yours


    And - who do you think you're kidding

  9. #9
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Need help making VBA to transpose and delete duplicates

    @ Trevor,

    there's no way on God's earth that I could understand, explain, replicate or maintain those routines
    All I did was to use the Worksheet array and resize it so that the new columns would fit

+ 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 duplicates & transpose secondary data
    By ljb24 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-04-2016, 02:26 AM
  2. Macro to find duplicates, concatenate cells, then delete old duplicates
    By givemepuppies in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-04-2016, 02:43 AM
  3. [SOLVED] Macro to find duplicates, concatenate Unique Values, then delete old duplicates
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-17-2013, 04:32 PM
  4. [SOLVED] Find duplicates, concatenate into different column, sum and delete duplicates
    By rosannang in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-17-2013, 11:23 AM
  5. Replies: 17
    Last Post: 07-05-2011, 05:37 PM

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