Compare two worksheet, match with 2 columns

bb - Jul 6, 2010 at 11:23 AM
 bb - Jul 7, 2010 at 12:56 AM

I have a workbook with 2 worksheet (April , May).it consist of 4 columns for each worksheet.i need to compare column A and column C with May worksheet.
If both column A and column C match, copy value in worksheet May from column D to Worksheet April column D.
If the row is not in worksheet May after the matching on Column A and Column C, then the whole row will be copy into worksheet April.

i have uploaded 2 files, once is raw, another one is output which is the result that i wish to get.

Sample files uploaded

Sample output files



1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jul 6, 2010 at 07:24 PM
You are asking rows to be copied or values to be copied from col D to Col D. But your sample book is showing a variance report. What you want ?
Hi Rizvisa1,

Corry for the confusion.
1)Compare April and May.
2)If the data is match then the value of column D copy into column E.So that i can compare
both April and May value and the variance column added in F to show the differences.
3)If the data is not match=copy the row as a new line.
Ie: if the May data not in April then at column E should=0

Thank you
Hi Rizvisa1,

Sorry for the confusion

1)Both worksheet April and May needed to be compare
2)If the data match at column A and Column C then Column D value copy into column E and
VAriance column added in F so that i can compare both value and show the differences.
3)IF the data not match then copy the row in last row.
Ie: if the data is not match then the row data needed to be copy as per below example.

Id , Name, Element , Value May, Value April, Variance
1 , bb , variable B , 123 , 0 , 123
2 , bb , CPF , 0 , 456 , (456)

i hope this explain well.