It's widely known that Frequency is much quicker. So if your IDs are numeric, you can use
=SUM(--(FREQUENCY(IF(ISNUMBER(SEARCH("China",A2:A10)),B2:B10),B2:B10)>0))
which must be entered as an array formula using Ctrl Shift Enter
If the IDs are non-numeric you have to use:
=SUM(--(FREQUENCY(IF(ISNUMBER(SEARCH("China",A2:A10)),MATCH(B2:B10,B2:B10,0)),ROW(B2:B10)-ROW(B1))>0))
or similar.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.