Home > Software design >  How to get an array of column values based on multiple INDEX and MATCH matches
How to get an array of column values based on multiple INDEX and MATCH matches

Time:10-12

How do you concatenate all values that match two criteria.

This is my data:enter image description here

And I would like to create a summary table that I was hoping it would look like this: enter image description here

My current formula (I have tried for hours), looks like this =TEXTJOIN(",",TRUE,IF(K1:O1=R2,VLOOKUP(Q3,J2:O5,MATCH(R2,K1:O1,0),FALSE),""))

but its doing something else entirely. I think I may have overcomplicated it :/. Thank you!

CodePudding user response:

In R3:

=LET(α,Q3:Q6,β,R2:T2,MAKEARRAY(ROWS(α),COLUMNS(β),LAMBDA(ξ,ζ,TEXTJOIN(",",1,IF(K1:O1&"|"&J2:J5=INDEX(β,ζ)&"|"&INDEX(α,ξ),T( K2:O5),"")))))

This assumes that the entries in the source table are text, not numeric, just as in the example you give.

  • Related