+ Reply to Thread
Results 1 to 3 of 3

Loop through a range of cells to find unique entries

  1. #1
    zoot
    Guest

    Loop through a range of cells to find unique entries

    Hello All,
    I am trying to loop through a column of cells for all unique entries. I
    know how to loop but i don't know how to specify the results of being unique
    and adding them to a seperate column can anyone help?

    Column A

    Test
    Test 1
    Test 2
    Test
    Test 1

    I want this to appear in column B

    Column B
    Test
    Test 1
    Test 2

    Thanks everyone



  2. #2
    somethinglikeant
    Guest

    Re: Loop through a range of cells to find unique entries

    Rather than looping I would use the following code:-

    Range("A:A").AdvancedFilter Action:=xlFilterCopy,
    CopyToRange:=Range("B1" _
    ), Unique:=True

    It uses Advanced Filter to copy unque entries to B1.
    Play around with this, I think it is far more straightforward,

    Somethinglikeant


  3. #3
    zoot
    Guest

    Re: Loop through a range of cells to find unique entries

    Thank you very much thats great!!!
    "somethinglikeant" <[email protected]> wrote in message
    news:[email protected]...
    > Rather than looping I would use the following code:-
    >
    > Range("A:A").AdvancedFilter Action:=xlFilterCopy,
    > CopyToRange:=Range("B1" _
    > ), Unique:=True
    >
    > It uses Advanced Filter to copy unque entries to B1.
    > Play around with this, I think it is far more straightforward,
    >
    > Somethinglikeant
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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