How to compare two excel worksheets.

[Closed]
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
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.




















1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
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
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month