+ Reply to Thread
Results 1 to 14 of 14

Counting occurences between a certain value based upon unique identifier

  1. #1
    Registered User
    Join Date
    07-25-2018
    Location
    Virginia, USA
    MS-Off Ver
    MS365 version 2407
    Posts
    14

    Counting occurences between a certain value based upon unique identifier

    Hello Everyone. I have this issue that I really don't even know how to start answering. Scenario - In Office30, I want to calculate how many test iterations have occurred between when a student (unique identifier) first fell below an initial A and when they got their next A. I will subsequently calculate the average number of test iterations it takes for a person to get back to an A after failing to achieve an A. I have the data in the vertical view (many other fields), but these are the key aspects (I think). It is important to note, that one student may "perpetually" bounce between an A and a B. I would like to be able to account for each instance that occurs for that one student. Please see the attached workbook for a sampling of the data (hopefully the file attached-it was kciking my butt).

    Thanks,

    Excelguruwannabe
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,715

    Re: Counting occurences between a certain value based upon unique identifier

    Administrative Note:

    Office30
    There is no such Excel product.

    Is your forum profile up-to-date and showing ONLY the oldest Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    07-25-2018
    Location
    Virginia, USA
    MS-Off Ver
    MS365 version 2407
    Posts
    14

    Re: Counting occurences between a certain value based upon unique identifier

    Sorry - Microsoft 365

  4. #4
    Registered User
    Join Date
    07-25-2018
    Location
    Virginia, USA
    MS-Off Ver
    MS365 version 2407
    Posts
    14

    Re: Counting occurences between a certain value based upon unique identifier

    MS365 version 2407

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,715

    Re: Counting occurences between a certain value based upon unique identifier

    Thanks.

    I've looked and don't yet fully understand the concept. I'll look again shortly.

  6. #6
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,921

    Re: Counting occurences between a certain value based upon unique identifier

    One guess,

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-25-2018
    Location
    Virginia, USA
    MS-Off Ver
    MS365 version 2407
    Posts
    14

    Re: Counting occurences between a certain value based upon unique identifier

    Windknife - I don't understand any of that magic that you suggested, but it almost worked. I noted two items that don't seem to work properly.

    Item 1 - for student 2, it looks like it is counting the first instance that they got the "A" (on test2) and rendering that a 1. But since they didn't get an A on test1, this should not be counted.

    Item 2 - Regarding the output, do you know how I would go up either summing them or averaging the output. Student 1 - 1 iteration, Student 2 - 1 and 2 iterations (but as discussed above, it should only be 2 iterations), student 5 - 2 iterations, student 6 - 1 and 2 iterations. Would it be some sort of function in the HSTACK?

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,715

    Re: Counting occurences between a certain value based upon unique identifier

    This would do Item 2:

    Please Login or Register  to view this content.
    Can't help with Item 1 - sorry.

  9. #9
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,921

    Re: Counting occurences between a certain value based upon unique identifier

    Amended formula,
    Please Login or Register  to view this content.
    I don't know what you want about item 2.
    You can upload a sample file with your expected results.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,715

    Re: Counting occurences between a certain value based upon unique identifier

    Maybe this, then?

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    07-25-2018
    Location
    Virginia, USA
    MS-Off Ver
    MS365 version 2407
    Posts
    14

    Re: Counting occurences between a certain value based upon unique identifier

    AliGW - Yes, this worked wonderfully. Item 2 - solved.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,715

    Re: Counting occurences between a certain value based upon unique identifier

    See the last two posts before yours.

  13. #13
    Registered User
    Join Date
    07-25-2018
    Location
    Virginia, USA
    MS-Off Ver
    MS365 version 2407
    Posts
    14

    Re: Counting occurences between a certain value based upon unique identifier

    Windknife & AliGW Between the two of you, you have solved this excel black magic for me. Thank you so much. I will mark the thread solved.

    Excellguruwannabe

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,715

    Re: Counting occurences between a certain value based upon unique identifier

    Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 02-16-2017, 07:53 PM
  2. Counting occurences of unique text between two columns
    By Nina970 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-05-2013, 02:34 AM
  3. [SOLVED] Counting a column of numbers based on a unique identifier
    By aaanenson in forum Excel General
    Replies: 2
    Last Post: 08-23-2012, 09:01 PM
  4. Counting Unique Occurences in excel?
    By ayo in forum Excel General
    Replies: 10
    Last Post: 05-14-2008, 12:48 PM
  5. Counting Unique Occurences in a Range
    By ShredDude in forum Excel General
    Replies: 3
    Last Post: 07-14-2007, 02:07 PM
  6. Counting unique occurences with criteria
    By LF123 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-21-2007, 03:21 PM
  7. [SOLVED] Counting occurences of a value tied to unique ID's
    By anjogasa@gmail.com in forum Excel General
    Replies: 2
    Last Post: 01-25-2006, 06:35 PM

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