简体   繁体   中英

How to get an array of column values based on multiple INDEX and MATCH matches

How do you concatenate all values that match two criteria.

This is my data: 在此处输入图像描述

And I would like to create a summary table that I was hoping it would look like this: 在此处输入图像描述

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM