+ Reply to Thread
Results 1 to 7 of 7

To generate a number sequence based on criteria from different columns

  1. #1
    Registered User
    Join Date
    03-15-2020
    Location
    Sydney, Australia
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    20

    To generate a number sequence based on criteria from different columns

    Hi friends,

    Please help me out in generating a formula to derive a number sequence.

    For the set of data attached here, for every identifier I need a number pattern to be generated as the output, based on the columns C,D,E,F,G,H,I and J, also the sequencing should start from the beginning for every assessment.

    In the example here, for Assessment1 even though row3 and row4 identifiers are the same but the individual constituents are different (for row3-P4="Y", whereas for row4-P4="G"), similarly for Assessment2 row9 and row11 have same identifiers and also the same constituents and hence the same sequence for both.

    Kindly help me on this.

    Thanks & regards
    Snehith
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: To generate a number sequence based on criteria from different columns

    Please try with helper column

    M2
    =TEXTJOIN(0,0,C2:J2)

    L2
    =MATCH(M2,INDEX($M$2:$M$11,MATCH(A2,$A$2:$A$11,)):$M$11,)


    or without helper

    =MATCH(A2&TEXTJOIN(0,0,C2:J2),$A$2:$A$11&$C$2:$C$11&0&$D$2:$D$11&0&$E$2:$E$11&0&$F$2:$F$11&0&$G$2:$G$11&0&$H$2:$H$11&0&$I$2:$I$11&0&$J$2:$J$11,)-MATCH(A2,$A$2:$A$11,)+1

  3. #3
    Registered User
    Join Date
    03-15-2020
    Location
    Sydney, Australia
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    20

    Re: To generate a number sequence based on criteria from different columns

    Thank you for your response, it was helpful.

    I wanted to extend this further, please find attached the sample scenario and similar sort of number sequencing is required.

    Thanks & regards,
    Snehith

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: To generate a number sequence based on criteria from different columns

    Please try with helper column

    M2
    =IF(K2="","",TEXTJOIN(0,0,C2:J2))

    N2
    =IF(M2="","",IFNA(VLOOKUP(M2,M$1:N1,2,0),COUNTIFS(A$2:A2,A2,M$2:M2,"?*")))

  5. #5
    Registered User
    Join Date
    03-15-2020
    Location
    Sydney, Australia
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    20

    Re: To generate a number sequence based on criteria from different columns

    Thanks a lot. This one worked.

    Regards,
    Snehith

  6. #6
    Registered User
    Join Date
    03-15-2020
    Location
    Sydney, Australia
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    20

    Re: To generate a number sequence based on criteria from different columns

    Hi,

    It appears that the formula is not working in all scenarios. One quick example, the countifs function does a count including the row where the output is displayed, as a result of this in some instances I'm getting one number more in the sequence generated. Could someone please help me on this.

    Thanks & regards,
    Snehith

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,897

    Re: To generate a number sequence based on criteria from different columns

    It may help the contributors understand the problem if you could upload a sample that illustrates the circumstance described in post #6.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] Generate unique ID based on criteria from different columns
    By cherias in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-28-2019, 11:34 PM
  2. [SOLVED] Generate Number based on dd/mm/yy with sequence independent of previous rows
    By Iuscogens in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-17-2018, 02:47 PM
  3. generate number sequence based on cell value
    By Pmaldini3 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-22-2015, 07:13 AM
  4. Formula to calculate next number in sequence based on varying criteria
    By Twaddy006 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-20-2014, 05:53 PM
  5. Replies: 2
    Last Post: 05-19-2013, 03:59 AM
  6. VBA Button to generate a number which does not duplicate ~ criteria based
    By opattison in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2012, 09:38 AM
  7. [SOLVED] generate sequence of number
    By cyzax7 via OfficeKB.com in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2006, 04:00 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