Forum Discussion

mb454316's avatar
mb454316
Copper Contributor
Apr 03, 2024

Need help building a numbering formula

Okay so I have these two tables. In table 1 I would like the “INPUT” column (column D) to populate the Input numbers differently but I can’t figure out a formula to do what I am intending.   ...
  • OliverScheurich's avatar
    Apr 03, 2024

    mb454316 

    =LET(rng,H3:K23,

    numbering,DROP(

    REDUCE("",SEQUENCE(,COLUMNS(rng)),LAMBDA(a,b,

    LET(

    z,IF(b=1,0,COUNT(CHOOSECOLS(rng,SEQUENCE(,b-1,1,1)))),

    HSTACK(

    a,

    REDUCE("",SEQUENCE(ROWS(rng)),LAMBDA(u,v,

    VSTACK(u,IF(INDEX(rng,v,b)="","",z+COUNT(INDEX(rng,1,b):INDEX(rng,v,b))))))))))

    ,1,1),

    "INPUT "&BYROW(numbering,LAMBDA(r,FILTER(r,r<>""))))

     

    This formula returns the intended result in my sheet. However it only works in Office 365 and Excel for the web.

     

     

    For verification i've applied the formula for range M3:P23 and it returns the expected result.

Resources