Results 1 to 10 of 10

Thread: non duplicate rows

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    non duplicate rows

    hi
    i would like to capter non duplicate rows
    here i have to pull everyhting
    Code:
    Sub FrmShow2()
    'Application.ScreenUpdating = False
    Dim wb As Workbook, wks As Worksheet
        Set wb = ThisWorkbook
        Set wks = wb.Sheets("Sheet2")
    
     
    
    Dim Mycel As Range
    Dim lrow As Long
    Dim i As Integer
    
    lrow = wks.Range("C65536").End(xlUp).Row
    For i = 1 To lrow
        With UserForm2 '.lstEmp
            If Cells(i, 7).Text = "" Then
          .lstEmp.AddItem Cells(i, 3).Value
              
            End If
        End With
    Next i
    UserForm2.Show
    End Sub

  2. #2
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: non duplicate rows

    try this bit of code to color the non duplicate rows
    Code:
    Dim x               As Long
    Dim LastRow         As Long
    
        LastRow = Range("A65536").End(xlUp).Row
        For x = 1 To LastRow
            If Application.WorksheetFunction.CountIf(Range("A1:A" & LastRow), Range("A" & x)) = 1 _
                And Range("A" & x) <> "" Then
                Range("A" & x).EntireRow.Interior.Color = vbGreen
            End If
        Next
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Re: non duplicate rows

    seenu
    it works great! i need one more thing
    i want duplicate records for example if the column b, column c , column d row 1 to row 15 are duplicate
    how do i take all the values from column a
    for exmaple

    column a b c d column e
    aaa x b d m
    bbb x b d n
    ccc x b d m
    ddd x b d n
    eee x b d n


    result would be column e vise
    m
    aaa
    ccc

    n
    bbb
    ddd
    eee

  4. #4
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: non duplicate rows

    i dont get u clearly, anyhow u can find any dups by countif just changing the range, if u dont understand let me know ur requirement bit more clearly.
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Re: non duplicate rows

    seenu
    thanks in excel somehow the alignment is not proper each word in each column the reusle would be "c' also below a only
    the beblow example
    Code:
    GROUP   USERID   USERNAME    DEPT    ENTERTINEMENT
    A              AAA   RAJESH        SERVICE    XXX
    B              BBB    STELLA        STORE       YYY
    C              CCC    MOHAN        SERVICE     XXX
    D              EEE    MKS             STORE      YYY 
    FILTERING DEPT AND ENTERTIMENT 
    GROUP
    XXX:  A
             C
    YYY:  B
            D
    FILTERING DEPT AND ENTERTIMENT
    
    USERID 
    XXX:   AAA
            CCC
    YYY:   BBB
            DDD
    Last edited by kamakshi; Mar 18th, 2012 at 08:03 AM.

  6. #6
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: non duplicate rows

    i m just confused, if posible attach ur excel file i hav excel 2003 only
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Re: non duplicate rows

    here it is
    result will be in sheet b. could you able to see the attachment
    Last edited by kamakshi; Mar 18th, 2012 at 08:59 AM.

  8. #8
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: non duplicate rows

    no file is attached
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Jun 2007
    Posts
    241

    Re: non duplicate rows

    here it is attached as zip file . Thanks Seenu
    Attached Files Attached Files

  10. #10
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: non duplicate rows

    Hi, i hav attached the file herewith as zip file, hav a look into that, may be it's not a easy method but hope it solve ur issue.
    Attached Files Attached Files
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width