VBA to pull in data from another open sheet after checking the data is all there?

tonywatsonhelp

Well-known Member
Joined
Feb 24, 2014
Messages
2,721
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi Everyone,
OK so need a bit of a saftety check on this so i dont mess up the data i bring in,

I want a macro that runs, and brings in the data from another open document.
I can do that part where we bring in the data but i want a macro that check everything is there first.
So In my Main Document I have Data in Columns A and B
For this part of the opertation i should have exactly the same data in columns A and B for the document i want to import.

for the time being i just to check if they both match and if so go ahead if they dont send me a message saying "data is not the same. please check and try again."
So basicly i need a macro to check if both sheets are the same and let me know,
the snag is i wont know the workbook name so need to base it on the only other open document. (i already have a macro checking this :)
Thanks

Tony
 

Some videos you may like

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Watch MrExcel Video

Forum statistics

Threads
1,127,529
Messages
5,625,351
Members
416,096
Latest member
forevans

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