+ Reply to Thread
Results 1 to 7 of 7

Sorting based on one column values and removing duplicates!

  1. #1
    Registered User
    Join Date
    12-27-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    60

    Sorting based on one column values and removing duplicates!

    Hi,
    I have to a sort a data in column in col C,D,E(removing duplicates)seperated by commas for a particular Manager Emp ID (col A and Col B).
    ie...data like this 1.JPG has to be converted into 2.JPG.
    Attached Files Attached Files

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

    Re: Sorting based on one column values and removing duplicates!

    Please Login or Register  to view this content.

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

    Re: Sorting based on one column values and removing duplicates!

    Try the attached.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    12-27-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Sorting based on one column values and removing duplicates!

    Quote Originally Posted by rcm View Post
    Please Login or Register  to view this content.
    This code is working for the Col's C and D but not for the date range column...its not getting separated by commas.

  5. #5
    Registered User
    Join Date
    12-27-2012
    Location
    Chennai
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Sorting based on one column values and removing duplicates!

    Quote Originally Posted by rcm View Post
    Please Login or Register  to view this content.
    This code is working for the Col's C and D but not for the week range column (Col E)...its not getting separated by commas.
    For me the week range(Col E) sorting alone is OK...i want to find out how many week ranges are there for a particular manager.
    Last edited by devpp; 08-26-2013 at 09:26 AM.

  6. #6
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: Sorting based on one column values and removing duplicates!

    Hi devpp,
    Try this code :

    Please Login or Register  to view this content.
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  7. #7
    Registered User
    Join Date
    07-14-2011
    Location
    Ha Noi, Viet Nam
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: Sorting based on one column values and removing duplicates!

    Try this :
    PHP Code: 
    Sub ExtractData()
    Dim i As LongAs LongAs LongjJ As Long
    Dim sArr
    (), dArr(), Dic
    sArr 
    Range("A2:F15").Value
    ReDim dArr
    (1 To UBound(sArr1), 1 To 6)
    Set Dic CreateObject("scripting.dictionary")
    For 
    1 To UBound(sArr1)
    With Dic
    If Not .Exists(sArr(i1)) Then
        k 
    1
        
    .Add sArr(i1), k
            
    For 1 To 6
                dArr
    (kj) = sArr(ij)
            
    Next j
        
    Else
        
    jJ = .Item(sArr(i1))
        
    dArr(jJ3) = dArr(jJ3) & "," sArr(i3)
        
    dArr(jJ4) = dArr(jJ4) & "," sArr(i4)
    End If
    End With
    Next
    [A19:F50].ClearContents
    If k Then [A19].Resize(k6).Value dArr
    End Sub 
    Attached Files Attached Files
    Last edited by sunflowers; 08-26-2013 at 09:48 AM.

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

    Re: Sorting based on one column values and removing duplicates!

    See my post #3
    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)

Similar Threads

  1. [SOLVED] Removing Duplicates based on column values and criteria
    By viduran88 in forum Excel General
    Replies: 9
    Last Post: 04-04-2013, 11:37 AM
  2. Excel 2007 : Removing Duplicates without sorting
    By mohit rawat in forum Excel General
    Replies: 2
    Last Post: 06-14-2012, 03:11 AM
  3. Replies: 6
    Last Post: 03-29-2012, 12:16 AM
  4. Replies: 10
    Last Post: 10-21-2011, 09:25 AM

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