+ Reply to Thread
Results 1 to 2 of 2

Looking to Create Consecutive IDs based on Criteria

  1. #1
    Registered User
    Join Date
    04-21-2017
    Location
    United States
    MS-Off Ver
    Excel
    Posts
    35

    Looking to Create Consecutive IDs based on Criteria

    Hello,

    I'm looking to create consecutive IDs (i.e. 1, 2, 3, 4, etc.) when a row meets a certain criteria. The criteria is that the include column = "YES" and people with the same class number will have the same ID. The desired result is below and I'm looking to get the "ID" row (I also attached the document). Thank you so much for your help.


    ID Class Name Include?
    1 804 Last Name 1 YES
    - 803 Last Name 2 NO
    2 805 Last Name 3 YES
    2 805 Last Name 4 YES
    3 801 Last Name 5 YES
    3 801 Last Name 6 YES
    3 801 Last Name 7 YES
    - 913 Last Name 8 NO
    - 913 Last Name 9 NO
    4 900 Last Name 10 YES
    4 900 Last Name 11 YES
    4 900 Last Name 12 YES
    - 700 Last Name 13 NO
    5 715 Last Name 14 YES
    5 715 Last Name 15 YES
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    21,056

    Re: Looking to Create Consecutive IDs based on Criteria

    You can use this formula in cell C3:

    =IF(F3="NO","-",IF(COUNTIFS(D$3:D3,D3)=1,MAX(B$2:B2)+1,INDEX($C$3:$C$17,MATCH(D3,$D$3:$D$17,0))))

    then copy down.

    Hope this helps.

    Pete

+ 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] Create a table based on top ranking criteria, based on multiple fields.
    By stevensimon10482 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-13-2017, 08:49 PM
  2. Create a specific number of consecutive rows based on row count input
    By goodlite in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-18-2017, 09:17 AM
  3. Replies: 5
    Last Post: 04-12-2016, 11:30 PM
  4. [SOLVED] Create Unique ID based on criteria
    By akhileshgs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-16-2015, 11:14 AM
  5. Replies: 11
    Last Post: 07-04-2014, 07:10 AM
  6. [SOLVED] Create report based on criteria
    By coldy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-31-2014, 12:57 PM
  7. MACROS: Sort by multiple criteria - Create tabs based off of criteria
    By svineyard in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2009, 10:48 AM

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