+ Reply to Thread
Results 1 to 6 of 6

Count Unique Values and Position

  1. #1
    Forum Contributor
    Join Date
    09-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Count Unique Values and Position

    In Column A in the attached spreadsheet there are 10 numbers but only 8 of them are unique. I need code to display each numbers position in the eight 1/8, 2/8, etc as shown in column B. Can someone help me with this?
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,605

    Re: Count Unique Values and Position

    I overcomplicated it
    But I try to work for all kind of possibilities (not only if it's just pairs)...

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Count Unique Values and Position

    Hi zbor. That works great but I need it in vba code as the results will not be entered into the same cell each time the spreadsheet is run. Any help would be good, thanks.
    Last edited by ccpsc; 10-23-2012 at 03:02 AM.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,605

    Re: Count Unique Values and Position

    You can use Evaluate(function).
    But since you need a VBA it can be simplier that way.

  5. #5
    Forum Contributor
    Join Date
    09-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Count Unique Values and Position

    Thanks zbor I managed to get it all to work. I used your formula in another sheet and used vba to transfer the results where I want them to display. I will keep Evaluate() in mind, I haven't seen it before.

  6. #6
    Forum Contributor
    Join Date
    09-08-2010
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Count Unique Values and Position

    zbor - There is a problem with the formula. It counts some different values as the same. See rows 1, 3 & 8 in attached file "Book2" This also means there is no 6/6

    Can anyone fix the formula?
    Attached Files Attached Files
    Last edited by ccpsc; 10-23-2012 at 09:28 PM.

+ 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