Macro to files two fields that match and then find the differences in other fields and move them to new table

starheartbeam

New Member
Joined
Aug 8, 2018
Messages
18
I need to write a macro. I have two tabs each tab has the same type of rows they are just from different dates.

I need to look a Sheet A at column C and compare it to Sheet B column C and find the ones that match.
If both column C match I need to look a column B for that row and see if they do not match. If they do not match I need to copy that row from Sheet B and paste it into Sheet C. I have been trying to figure this out for a while and can't seem to get it to work. I need to put this in a macro because i have a macro doing some other things to this file and I need to add this piece to it. Please any help would be great.

Example
Sheet A
Sheet B
1/2/19
USA
1234
1/4/19
USA
1234
1/2/19
USA
9876
1/4/19
CA
9876
1/2/19
USA
4562
1/4/19
CA
4562

<tbody>
</tbody>


So for the above example Sheet C after the macro would look like this:
Sheet C
1/4/19
CA
9876
1/4/19
CA
4562

<tbody>
</tbody>
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,215,063
Messages
6,122,930
Members
449,094
Latest member
teemeren

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top