0

Having difficulty comparing the 2 columns to get the result

list 1     List 2

AT.aaa      Yes
SM.aaa      No
CM.aaaa     Yes
DV.aaaa     Sorry
SI.aaaa     NA
AT.bbb      yes
AT.cccc     NA
SM.cccc     Sorry
CM.bbb      No

My Motive is to fill this table

      Yes   No   Sorry    NA
AT     2     0     0      1
SM     0     1     1      0
DV
CM
SI

I am able to find the count of Yes, No. and sorry individually using Countif but am no able to find the value of those with the other parameter. Can you guys help me out.

1 Answer 1

4

I would use the COUNTIFS() formula:

=COUNTIFS($A:$A,"*" & $D2 & "*",$B:$B,E$1)

enter image description here

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks Scott, Can you help me understand the formula ?
COUNTIFS() allows multiple ranges and criteria, it is AND based. The first is using wildcards "*" both before and after the criteria to find the strings that contain the criteria. This will find anything that has the value in column D in the values of Column A. Then the second is just a straight forward find.
@VinodK you would put it in E2 and drag across and down.
Thanks a lot for your help , Scott!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.