Pull data from closed WB in array

sujittalukde

Well-known Member
Joined
Jun 2, 2007
Messages
520
I would like to get the help of esteemed members to post macro (or provide link if known) which will extract data from closed WB and fill data to current (Open) WB from where macro is run in the following manner BUT with the help of array to reduce code length since coulums and rows are large in number.

The macro will open the Close WB say c:\sample.xls (may or may not be visible to user).
Pick the values in Column B (base column), C,D,E,F,I,K,N,S
Close the WB without saving.
Actually Column B contains the name of the employees and other columns are their total data personal as well as salary data.

In the current WB from where the code is run, Col B conatins the name of the employees. Some new names may be there some names may be missing. Also the order of name in closed WB may not be same in current WB.

Then after closing the Wb, the macro should shift focus to current WB.
Will start matchng name in Column B from the values stored in array and if found the name fill the data in corresponding columns viz C,D,E,F,G,H,I,,J of current WB for that employee
The macro will continue till last employee name appearing in the col B of current WB is finished.

In a new sheet of the current WB list of nam of employees and their corresponding data should be dumped whose name were not found in the col B.

and done.


Regards
Sujit
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,224,609
Messages
6,179,874
Members
452,949
Latest member
Dupuhini

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