how to compare data in 2 column

Gokrish

New Member
Joined
Jul 30, 2004
Messages
41
I have 357 data in column 1 and 63 data in column B. All the data in column B is contained in column A. I want to compare column A and B and get a "true" if the item in column B is in column A, or get False. So I am expecting 63 "true". Can anyone help me with this, it is kind of urgent. Thanks
 

Some videos you may like

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

hayden

Board Regular
Joined
Sep 23, 2005
Messages
159
You could use a sumif command

assuming that col 1 is A and that your data starts in A1 then:
Code:
=sumif($b$1:$b:67,a1,$c$1:$c$677)

That would go in d1

Before it will work you need to put a list of 1 in c1-c67

This will return a value of 1 if the value is found and otherwise a value of 0. You can also copy this formula down from a1 - a357

Hope that helps.
hayden
 

shajueasow

Well-known Member
Joined
Oct 7, 2004
Messages
1,926
Or something like the following in Column C downwards:
=OR(EXACT(B1, $A$1:$A$357))
remember to enter it with CTRL+SHIFT+ENTER
 

Watch MrExcel Video

Forum statistics

Threads
1,109,446
Messages
5,528,802
Members
409,836
Latest member
karnasrinivas

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top