View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Roger[_10_] Roger[_10_] is offline
external usenet poster
 
Posts: 4
Default Comparting two excel sheets ...

"Harish Mohanbabu" wrote in message
...
The following fields are common between the sheets -
1. Customer ID
2. Name
3. Address details etc.


Suggest use the Vlookup function to compare data. See Excel help for syntax
details.
eg. If Sheet1 and Sheet2 contain CustomerID in column A, Name in column B
and Address in column C insert the following functions:
Cell D2 of Sheet1 =VLOOKUP(A2,Sheet2!A:C,2,FALSE)
Cell E2 of Sheet1 =VLOOKUP(A2,Sheet2!A:C,3,FALSE)
Then fill this formula down to the end of the data area on Sheet1.
Sheet 1 Column D will then show the matching Name from Sheet 2.
Sheet 1 Column E will then show the matching Address from Sheet 2.
If no data is found on Sheet2 for a CustomerID on Sheet1 then #N/A will be
returned for that row.
You can then easily compare Name and Address data by using a True/False
formula: B2=D2 and C2=E2 etc.
Modify the above example to reverse the lookup from Sheet2 to Sheet1 to show
details on Sheet2 which are not on Sheet1.

HTH

Roger