+ Reply to Thread
Results 1 to 3 of 3

Determine a "type" for each student based on combination of values

  1. #1
    Registered User
    Join Date
    07-29-2020
    Location
    NJ-USA
    MS-Off Ver
    Professional Plus 2016
    Posts
    1

    Post Determine a "type" for each student based on combination of values

    Dear Experts: Please help me write a formula on the following data. A student can be listed maximum 4 times in a row and a minimum on a 1 row.

    Logic: If the Code = EXCL in all Terms then Type=Exclusive
    If the Code = NONE in all Terms then Type=NONE
    if the Codes are mix like in for studentid=100000002 then Type=Some



    StudentID Term Code Type
    100000000 Fall 2019 EXCL Exclusive
    100000000 Spring 2020 EXCL Exclusive
    100000000 Summer 2019 EXCL Exclusive
    100000000 Winter 2020 EXCL Exclusive

    100000001 Fall 2019 NONE None
    100000001 Spring 2020 NONE None
    100000001 Summer 2019 NONE None
    100000001 Winter 2020 NONE None

    100000002 Fall 2019 NONE Some
    100000002 Spring 2020 NONE Some
    100000002 Summer 2019 EXCL Some
    100000002 Winter 2020 EXCL Some


    Thank you for your help
    Attached Images Attached Images
    Last edited by 6StringJazzer; 07-29-2020 at 04:20 PM. Reason: Changed title from "Help write a formula please"

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Determine a "type" for each student based on combination of values

    Hi, welcome to the forum

    (almost always better to upload a sample dummy workbook rather then post a pic, we cant really work with them)

    Take a look at using some nested countiS() for this, something like...
    =if(countif(A:A,A2)=countifs(A:A,A2,C:C,"EXCL"),"Exclusive",if(countif(A:A,A2)=countifs(A:A,A2,C:C,"NONE"),"None","Some))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Determine a "type" for each student based on combination of values

    Try:

    Please Login or Register  to view this content.
    Quang PT

+ 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. [SOLVED] Write Sub procedure to format excel and write case/if statement to text file
    By vbronton in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-06-2018, 08:26 AM
  2. [SOLVED] How to write a formula that pulls in another string of formula from another cell
    By raging_turtle in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-21-2016, 04:17 AM
  3. [SOLVED] Want to write a new formula that is based upon an existing formula
    By FRANKinATLANTA in forum Excel General
    Replies: 8
    Last Post: 08-22-2016, 04:29 PM
  4. MACRO FORMULA:Write FORMULA manually instead of VLOOKUP IN VBA
    By tieyanna in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2015, 10:40 AM
  5. Macro formula:write formula manually instead of vlookup
    By tieyanna in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-20-2015, 08:42 AM
  6. Replies: 2
    Last Post: 02-17-2012, 03:08 AM
  7. how do i write a formula and keep in in formula form, so it DOESN.
    By norcalchick2207 in forum Excel General
    Replies: 2
    Last Post: 02-04-2005, 05:06 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