VBA Code to compare data between 2 sheets and copy differences

shafiq2

New Member
Joined
Jun 19, 2014
Messages
42
Hi,

I have a master list of Date in Column B and Ex.Rate in column A "Sheet1", and another sheet called "Sheet2" this sheet gets updated with new Date and ex.range, I want a VBA code to compare this two list and add the differences in new row from sheet2 to sheet1 same range.

Kind Regards,
 
Hi,

Here is the code as you requested.

[Range("A2:B19").Select
Selection.Copy
Sheets("SHEETNAME").Select
Range("A" & Rows.Count).End(xlUp).Offset(1).Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=3
Range("B118").Select
Application.CutCopyMode = False
ActiveSheet.Range("$A$1:$B$151").RemoveDuplicates Columns:=2, Header:=xlYes]
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
shafiq2,

Thanks for the macro code.

Using the VBA Editor to record your movements in the workbook will get the job done to a certain degree.

Glad you were able to solve your own request.

And, come back anytime.
 
Upvote 0

Forum statistics

Threads
1,224,802
Messages
6,181,048
Members
453,014
Latest member
Chris258

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