How to compare two excel worksheets.

Closed
RAO UV - Jul 12, 2010 at 10:00 AM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jul 13, 2010 at 08:08 AM
Hello,

Iam having two excel sheets as below.

file 1
---------------------------------------------
sl pol no loan amount name
--------------------------------------------
1 05 100 aaa
2 10 200 bbb
3 15 500 ccc
4 20 600 ddd
5 25 800 eee
=========================

file 2

=========================
sl pol no status
=========================
1 10 21
2 15 31
3 25 41
=========================



answer table required by me ( on merging and comparing both files)
===============================
sl no pol no status loan
===============================
1 10 21 200
2 15 31 500
3 25 41 800
===============================


HOW I CAN GET THE ANSWER TABLE. ,PL HELP ME.




















Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jul 13, 2010 at 08:08 AM
Use function VLOOKUP

=VLOOKUP(B2, 'FILE 1'!B:C, 2, False)

This is saying
Look at the value in cell B2
Compare this b2 value in Column B of FIle1
when the match is found give me the second column value in range B:C (which would be C)

and false is saying, I want an exact match

In case there might be missing matches you can have

=IF(ISERROR(VLOOKUP(B2, 'FILE 1'!B:C, 2, False)), "",VLOOKUP(B2, 'FILE 1'!B:C, 2, False))
6