• 470K Members
• 5,605 Online
• 568K Conversations

## Compare two columns of data

Occasional Visitor

# Compare two columns of data

I am looking for a formula that produces the following please

If range of values in column B also appear within range of values in column A, column C = YES or NO

I know this is probably a very basic query and that the answer is out there i just cant work out how to word my question! Hopefully this makes sense.

eg;

 A B C 1 2 YES 2 8 NO 3 9 NO 4 3 YES 5 7 NO
2 Replies

# Re: Compare two columns of data

=IFERROR(IF(MATCH(B2,\$A\$2:\$A\$6,0)>0,"Yes","No"),"No")

Sample file is also attached for your reference.

Thanks

Tauqeer

# Re: Compare two columns of data

Hi, assuming your table starts in cell A1, write this formula in Cell C2 and copy down:

=IF(COUNTIF(A:A;B2)=1;"YES";"NO")

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
48 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies