Copy data from 2 worksheets and delete duplicates.

mcontr01

New Member
Joined
Jun 30, 2016
Messages
3
Hi, I am trying to do the following in VBA and cannot come close to getting it to work:

1. WS "Current Month" Find column with header "PROVIDER_CUSTOMER_NAME", then copy the data from row2 to the last row (the row range should come from column A)
2. Paste data on WS "MOM" (Month Over Month) starting in cell A3.
3. Then copy the same data from WS "Prior Month" by finding the same header "PROVIDER_CUSTOMER_NAME", t row2 to the last row (the row range should come from column A)
4. Past Prior Month data under the last of one pasted from "Current Month" on the WS "MOM".
5. select all pasted from both WS and delete duplicates.

Any help would be very appreciated!
 

Some videos you may like

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Saurabhj

Active Member
Joined
Jun 6, 2020
Messages
413
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi, Is Provider_Customer_Name column is not fixed ?

Also, is the header on row number 1 in all three sheets ?
 

mcontr01

New Member
Joined
Jun 30, 2016
Messages
3
Hi, Is Provider_Customer_Name column is not fixed ?

Also, is the header on row number 1 in all three sheets ?
Hi Saurabhj, The header row is consistent on both Prior Month and Current Months sheets. They never change.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,121
Messages
5,622,861
Members
415,935
Latest member
kes1973

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
Top