Extracting all rows based on a value of cell without VBA

前端 未结 4 1869

I\'m really struggling to find an answer to this as online I\'ve really only found VBA solutions to this problem which isn\'t what I wish to learn how to do.

4条回答
  •  佛祖请我去吃肉
    2020-12-30 14:22

    This does not use array formulas, but does use a helper column. Assuming data in cols A through D, in E2 enter:

    =IF(A2="O",1+MAX($E$1:E1),"")
    

    and copy down:



    Each of the O rows is marked with a simple sequential value. This makes it easy for the usual MATCH() / INDEX() methods.

    Pick some other cell and enter:

    =IFERROR(INDEX(A:A,MATCH(ROWS($1:1),$E:$E,0)),"")
    

    and copy this cell both across and down:

提交回复
热议问题