Comparing worksheets & input data

  • Thread starter Thread starter Caseymom
  • Start date Start date
C

Caseymom

Help please....I am trying to compare data in 2 sheets to get the difference
from month to month

#1 (previous month's forecast)
Customer Part number Dollars
ABD 1234 $500

#2 (current month's forecast)
Customer Part number Prev Month $ Dollars Difference
ABD 1234 ?? $600
$100

I am trying to find a formula that would compare the 2 worksheets : if
customer & part number match from #1 to #2 then input the dollars from that
customer on #1 to same customer on #2. One problem I run into is that there
could be a customer or part number addition or subtraction from one month to
another.
 
Hi,

Assume that your data in sheet 1 is in range A3:C21 (including the header
row). In sheet 2, you have ABD in cell A5, 1234 in cell B5 and 600 in cell
D6. In cell C5, you could array enter (Ctrl+Shift+Enter) the following
formula

=INDEX(Sheet1!$A$3:$C$21,MATCH(1,(Sheet1!$A$3:$A$21=Sheet2!A5)*(Sheet1!$B$3:$B$21=Sheet2!B5),0),3)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 
Back
Top