Searching rows for two entries and returning the successful results (adapting existing code)

后端 未结 2 1596
情深已故
情深已故 2020-12-22 02:21

I am currently using this code in Excel to find and return, via an array, the results of a search but I need to adapt it to search based on two criteria instead of one and w

2条回答
  •  悲&欢浪女
    2020-12-22 02:25

    Basing your two-criteria match for progressive (first, second, third, etc matches) results can be made easier with the newer AGGREGATE¹ function.

            

    The standard formula in E4 is,

    =IFERROR(INDEX(C$1:C$999, AGGREGATE(15, 6, ROW($1:$999)/((A$1:A$999="Bad")*(B$1:B$999="Good")), ROW(1:1))), "")
    

    Fill down as necessary.


    ¹ The AGGREGATE function was introduced with Excel 2010. It is not available in earlier versions.

提交回复
热议问题