+ Reply to Thread
Results 1 to 5 of 5

unique values in a range

  1. #1
    Forum Contributor
    Join Date
    11-22-2006
    MS-Off Ver
    2010
    Posts
    201

    unique values in a range

    HI ALL

    I have a range of values in range A2:AF30000
    These items are not unique.

    Can I ask how in VBA i can analyse the data and export a list of unique values into a range below below the data range and count the number of times each unique value is observed?

    Thanks
    L

  2. #2
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: unique values in a range

    Hi,

    If you want a count of each distinct item then a pivot table would be a good choice.
    Hope that helps,

    Colin

    RAD Excel Blog

  3. #3
    Forum Contributor
    Join Date
    11-22-2006
    MS-Off Ver
    2010
    Posts
    201

    Re: unique values in a range

    HI Colin, but the values are in separate columns and those items in the first column might not exist in the 2nd column and so on.

    I thought about a pivot but couldnt think how to run it to produce the desired result.

    L

  4. #4
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: unique values in a range

    Hi,

    You're right - I misread the range as A2:A30000.

    The biggest issue with this is the sheer quantity of data - you have roughly 1 million items to check.
    Are you using Excel 2007 or later?
    Last edited by Colin Legg; 05-11-2011 at 04:35 AM.

  5. #5
    Forum Contributor
    Join Date
    11-22-2006
    MS-Off Ver
    2010
    Posts
    201

    Re: unique values in a range

    Hi Colin, thanks for your reply. I am using Excel 2007.

    I ended up using the countif() function.

    thanks
    Luce

+ 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