+ Reply to Thread
Results 1 to 13 of 13

identifying number associated with most recent unique id

  1. #1
    Registered User
    Join Date
    12-09-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    61

    identifying number associated with most recent unique id

    Column A has unique ids
    Column B has total number of activities per month
    Column C has total number of actiities year to date (formula: =SUMIF(A$1:A1,A1,B$1:B1)

    I would like to create a formula that identifies the most recent (furthest down the sheet) unique id and creates a count of how many unique ids have a total number of activities YTD of X number. I say most recent becasue I do not want to duplicate any unique ids in the count.
    Last edited by dforte; 04-12-2011 at 11:42 AM.

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: identifying number associated with most recent unique id

    You MAY be able to ID the latest entry in col A by using INDEX() and COUNTA().

    Are there formulas in col A?
    Are there gaps in col A?

  3. #3
    Registered User
    Join Date
    12-09-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: identifying number associated with most recent unique id

    No formulas in the unique id column. Each row is an instance of information associated with that unique id. The only gaps are complete row gaps to identify when a new month occurs.

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: identifying number associated with most recent unique id

    Can you post a sample file showing the setup (covering 2 or 3 gap rows) so I can see how to get last row?

  5. #5
    Registered User
    Join Date
    12-09-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: identifying number associated with most recent unique id

    Here is an example. So again, I want to create a formula to count the most recent instance of each uinque id and then be able to indicate the total number of activities.

    So for instance there are 4 id's with 3 activities (unique id's 1, 2, 3 & 4). There are four id's with 1 activity (unique id's 5, 6, 8, & 9).

    Make sense?
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    12-09-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: identifying number associated with most recent unique id

    Might even be easier if we were to create a formula to simply identify the most recent instance of the unique id, and then create suming formulas based on that...

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: identifying number associated with most recent unique id

    I'm not getting what it is that you're after.

    A simple COUNTIF(A:A,"X") where X is a unique ID yields the results you gave in Post #5.

    INDEX(A:A,COUNTA(A:A)) gives the last ID number in col A.

    Where do you want to go from there?

  8. #8
    Registered User
    Join Date
    12-09-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: identifying number associated with most recent unique id

    So the number of activities for each instance could be more than 1. This is why the summed column of activiteis based on unique id is important.

    I think if I could create a formula that would identify the most recent (furthest down) instance of a unique ID I could then create seperate summing formulas to indicate which ID have a certain number of total activities...

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: identifying number associated with most recent unique id

    Still at a loss to know what the end goal is but does this help?

    Change the ID number in cell F2 and then use a MAX() on the F column to ID the most recent occurrence of that ID #
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    12-09-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: identifying number associated with most recent unique id

    This does help, thank you!

    The end goal is to identify the most recent occurance of each unique id and then create seperate counting formulas to see how many of these unique ids have a certain number of total activities.

    For instance, I need to know how many have 5+ activities, how many have 4, 3, 2, etc.

    If there is a drag down formula that could identify the most recent occurance, similar to the max function you proposed except not conditional on the inputting of the each id independently, I could then create a countif function based on the identification of the most recent occurnace.

  11. #11
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: identifying number associated with most recent unique id

    This help? Change the row 1000 to a higher number if you anticipate that.
    Attached Files Attached Files

  12. #12
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: identifying number associated with most recent unique id

    How's this:

    Change the # in cell H2 and you get an X beside ID's that equal or exceed that number.
    Cell I2 counts the X's
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    12-09-2009
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    61

    Re: identifying number associated with most recent unique id

    Thank you, Cutter! -- That works well.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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