Question

Please see my image

enter image description here

I am have two questions:

  1. Do you know what is the proper function to count number of rows that have F column value don't exist in range J3:J15 (expect result is 3, as the image)
  2. List/or show values in Column A, B of above rows (the rows that have F column value don't existing)
Was it helpful?

Solution

Way №1

In cell H2 use:

=IF(ISNUMBER(MATCH(F2,$J$3:$J$15,0));"exist in list","not exist in list")

and drag it down.

Then in C12 you can use:

=COUNTIF(H2:H8;"not exist in list")

enter image description here

Way №2

In C12 use:

=SUMPRODUCT(1*NOT(ISNUMBER(MATCH($F$2:$F$8,$J$3:$J$15,0))))

This is an array formula, so type the formula then press CTRL+SHIFT+ENTER. Curly brackets will automatically appear at the start and end of the formula.

Then for returning list of corresponding values in column A use, say, in F12:

=IFERROR(INDEX(A:A,SMALL(IF(NOT(ISNUMBER(MATCH($F$2:$F$8,$J$3:$J$15,0))),ROW($F$2:$F$8)),ROW()-ROW($F$12)+1)),"")

this is also array formula, so press CTRL+SHIFT+ENTER to evaluate it and then drag formula down.

and in G12 for returning corresponding values from column B:

=IFERROR(INDEX(B:B,SMALL(IF(NOT(ISNUMBER(MATCH($F$2:$F$8,$J$3:$J$15,0))),ROW($F$2:$F$8)),ROW()-ROW($F$12)+1)),"")

also with array entry(CTRL+SHIFT+ENTER).

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top