Results 1 to 12 of 12

Thread: [SOLVED]Finding unique values in column

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    singapore
    Posts
    86

    Question [SOLVED]Finding unique values in column

    I have a column of data where I have to extract the unique values and display them in another column. I'm using this method to do it.
    PHP Code:
    Sub Find() 
    Worksheets("readtxt2").Activate 
    On Error Resume Next 
    If Range("A1").Value "" Then 
        
    '// handle the error here and End 
        MsgBox "Could NOT exercute" 
        End 
    End If 

                        '
    the range where it gets values n pastes it here 
    FindUniqueValues Range
    ("D2 : D3000"), Worksheets("readtxt2").Range("H1"
    On Error GoTo 
    End Sub 

    Sub FindUniqueValues
    (SourceRange As RangeTargetCell As Range
     
    SourceRange.AdvancedFilter Action:=xlFilterCopy
            CopyToRange
    :=TargetCellUnique:=True 
    However, when I run my program and get the unique values, I always get the first two rows of data of the same value(meaning range("A1") and ("A2") shows the same value) How to solve it? Pls help.Thankyou.
    Last edited by ITboy; Apr 13th, 2003 at 09:43 PM.

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