Forum Discussion
mahib4u
Jan 03, 2022Copper Contributor
Find value in same position with specific word in next cell.
Hi everyone, I've two cells(A and B) with values separated by pipes. For a specific word in column B I'd like to fetch the value from column A which is in the same position as the specific word i...
SergeiBaklan
Jan 04, 2022Diamond Contributor
As variant
=LET(
splitA, FILTERXML( "<t><s>"&SUBSTITUTE(A2,"|","</s><s>")&"</s></t>", "//s" ),
splitB, FILTERXML( "<t><s>"&SUBSTITUTE(B2,"|","</s><s>")&"</s></t>", "//s" ),
pos, SEQUENCE(ROWS(splitB))*(splitB="Cancelled"),
f, FILTER(pos, pos),
IFERROR( TEXTJOIN( ", ", 1, INDEX( splitA, f ) ), "" ) )