Compare 2 sheets - output in sheet 3 - Excel

Closed
vicgarin Posts 1 Registration date Thursday March 17, 2011 Status Member Last seen March 17, 2011 - Mar 17, 2011 at 08:58 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Mar 18, 2011 at 11:25 AM
Hello,

I have 2 sheets. For example:

Sheet 1:

A2 = 777
B2 = 5

A3 = 438
B3 = 4

A4 = 555
B4 = 3

Sheet 2:

A60 = 777
B60 = 4

A1233 = 438
B1233 = 4

I want Output in Sheet 3 like this:

A1 = 777 (In Sheet 3 only if Match Sheet1's A == Sheet2's A and Sheet1's B != (is NOT) Sheet2's B)
B1 = 5 (Value from Sheet 1 - B2)
C1 = 4 (Value from Sheet 2 - B60)



So when it matches A3 to A1233 it checks if corresponding value in B is same, if it is same (see B3 = B1233 when A is matched), it will NOT output anything in Sheet 3.

If it cannot find corresponding for A in sheet 2 it will output like this in Sheet 3:

A2 = 555
B2 = 3
C2 = null


Help appreciated.

Thank you.

Excel 2003.
Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Mar 18, 2011 at 11:25 AM
Hi vicgarin,

Formula for Sheet3 A1:
=IF(AND(Sheet1!A2=Sheet2!A60,Sheet1!B2<>Sheet2!B60),Sheet1!A2,"")
Formula for Sheet3 B1:
=Sheet1!B2
Formula for Sheet3 C1:
=Sheet2!B60

Formula for Sheet3 A2:
=IF(AND(Sheet1!A3=Sheet2!A1233,Sheet1!B3=Sheet2!B1233),"",Sheet1!A4)
Formula for Sheet3 B2:
=Sheet1!B4
Sheet3 A1:
null

Can't see the logic in this, so I probably misunderstood you.
Can you explain where I took a wrong turn?

Best regards,
Trowa
0