+ Reply to Thread
Results 1 to 3 of 3

count unique records with latest date

  1. #1
    Registered User
    Join Date
    05-30-2005
    Posts
    38

    Angry count unique records with latest date

    I Want To Count All "x" With Unique Record In Column B
    Parameter Must Be The Latest Date In Colum C Will Count

    Answer Is "2"
    Date Of 10/01/05 08:01am
    Ed & Xr

    What Is The Easyway To Create This Formula
    Tnx


    A B C

    X Ed 10/01/05-08:00am
    X Ed 10/01/05-08:01am
    X Xr 10/01/05-08:00am
    X Xr 10/01/05-08:01am

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello xtrmhyper,

    This macro will return a Variant Array. Array(0) = the number of unique entries and Array(n) to Array(n+x) = the column "B" values sorted in ascending order. Just put the sort range in as a string. The range is assumed to be on the active worksheet and to contain 3 columns.

    Calling the Macro:

    Dim N, X

    N = FindUnique("A1:C4")

    X = N(0) ' X = 2
    X = N(1) ' X = "Ed"
    X = N(2) ' X = Xr



    Macro Code:

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Bob Phillips
    Guest

    Re: count unique records with latest date

    Try this formula

    =COUNT(1/FREQUENCY(IF((A2:A10="X")*($C$2:$C$10=MAX($C$2:$C$10)),MATCH(B2:B10
    ,B2:B10,0)),ROW(INDIRECT("2:"&ROWS(B2:B10)-ROW(B2)+1))))

    which is an array formula, so commit with Ctrl-Shift-Enter

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "xtrmhyper" <[email protected]> wrote
    in message news:[email protected]...
    >
    > I Want To Count All "x" With Unique Record In Column B
    > Parameter Must Be The Latest Date In Colum C Will Count
    >
    > Answer Is "2"
    > Date Of 10/01/05 08:01am
    > Ed & Xr
    >
    > What Is The Easyway To Create This Formula
    > Tnx
    >
    >
    > A B C
    >
    >
    > X Ed 10/01/05-08:00am
    > X Ed 10/01/05-08:01am
    > X Xr 10/01/05-08:00am
    > X Xr 10/01/05-08:01am
    >
    >
    > --
    > xtrmhyper
    > ------------------------------------------------------------------------
    > xtrmhyper's Profile:

    http://www.excelforum.com/member.php...o&userid=23851
    > View this thread: http://www.excelforum.com/showthread...hreadid=478152
    >




+ 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