简体   繁体   中英

Excel search range and return corresponding column number

I am trying to make my excel document search a range and return the table value of every incidence. In the picture below , I am trying to enter a formula in the leftmost (green) cell that will search the table (bold outline) for all instances of "Piercing", then return the position of each instance (The corresponding number in the blue row) as a list. What I have in the green cell is what I'd like it to look like. If necessary, I'm ok with it not showing duplicate entries and instead just showing where one of the instances is.

Try below formula-

=TEXTJOIN(",",TRUE,FILTER(C1:L1,MMULT(SEQUENCE(1,ROWS(C2:C4),,0),--((C2:L4="Piercing")))))

And if you have BYCOL() function then could try-

=TEXTJOIN(",",TRUE,FILTER(C1:L1,BYCOL(C2:L20000,LAMBDA(x,MAX(--(x="Piercing"))))))

在此处输入图像描述

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