简体   繁体   中英

filtering multiple values based on one matching criteria in a different column in excel

I have the following set of data in excel that has transactions grouped by Set ID. I want to only view Set IDs that have at least one status1 of "Active" in the group. How do I identify these sets and remove the others that don't have at least one status1 of Active?

在此处输入图像描述

This is a possible solution when using Office 365:

=LET(data,A1:C11,
     a,INDEX(data,,1),
     c,INDEX(data,,3),
     f,FILTER(a,(c="a")+(ROW(c)=1)),
     m,SIGN(MMULT(--(TRANSPOSE(f)=a),SEQUENCE(ROWS(f),,1,0))),
FILTER(data,m))

在此处输入图像描述

(Drop the +(ROW(c)=1) if you don't want the header included)

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