简体   繁体   中英

How to search for one value in a column against all values in multiple columns in Excel

I tried a lot to find a solution for the below issue, lets say I have column A,C,D; I want to take the fist value in column A and check if it exist in C or D entire columns; if exist then I will return A, then take the second value in A and search in C & D columns and so on.

The bottom line, is that I want to find the count of each value in column A that existed in C or D

Thanks

=COUNTIF(C:C,A1:A4)+COUNTIF(D:D,A1:A4)

在此处输入图像描述

Using SUMPRODUCT Function

Formula used in cell B2

=SUMPRODUCT((A2=$C$2:$C$7)+(A2=$D$2:$D$7))

And Fill Down!

公式

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM