View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Compare 2 sets of data

One guess n play to try out ..

Assume tables as posted within A1:E8,
list 1 in cols A - B, list 2 in cols C - D

Put in E2, array-enter* to confirm the formula:
=ISNUMBER(MATCH(1,($A$2:$A$7=C2)*($B$2:$B$7=D2),0) )
Copy E2 down to the last row of data in List 2, ie to E8

*press CTRL+SHIFT+ENTER

These will be the results returned:

ID Name
1 RPS FALSE
2 CPM FALSE
2 ROP TRUE
3 RW TRUE
4 DCE FALSE
5 EPR FALSE
5 RW TRUE

--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Rajula" wrote:
Compare 2 sets of data and return a true or false in a third column.
Can i use Pivots or lookups or any functions

I need list 2 to look at list 1 and compare and let me know that ID 1 is
mapped to the same Name & return true/false.
What makes it complicated is that Some IDs have 2 names mapped to it & the
names can be different. But even if 1 of the name
is different, if it returns a false, it will be sufficient.

List 1 List 2

ID Name ID Name
1 RW 1 RPS
2 ROP 2 CPM
3 RW 2 ROP
4 EPR 3 RW
5 DCE 4 DCE
5 RW 5 EPR
5 RW

This is what the result should look like.

ID Name
1 RPS False
2 CPM False
2 ROP False
3 RW True
4 DCE False
5 EPR False
5 RW False