Excel - How to count number of rows in range (i.e. various columns) that contain certain string?

前端 未结 3 1793
再見小時候
再見小時候 2021-01-25 23:54

I have a list A of strings and I want to see if and if yes in how many rows each string is represented in range B. My data looks something like this:

List A:

<         


        
3条回答
  •  情书的邮戳
    2021-01-26 00:39

    As much as I like to avoid encouraging the use of the volatile OFFSET¹ function, it seems the most likely candidate in this situation.

            

    The array formula in F2 is,

    =SUM(SIGN(COUNTIF(OFFSET(A$2, ROW($1:$99)-1, 0, 1, 3), E2)))
    

    Array formulas need to be finalized with Ctrl+Shift+Enter↵. Once entered into the first cell correctly, they can be filled or copied down or right just like any other formula.

    ¹OFFSET is considered a volatile function that recalculates whenever anything in the workbook changes.

提交回复
热议问题