Refresh the data based on a Command Button click to Auto Filter, Copy from a File/Worksheet stored at a particular location & Replace while Pasting in

abdulbarimd

New Member
Joined
Aug 23, 2013
Messages
3
Hi All,

Request your help in defining a macro for a command button which helps me to Autofilter and Copy from a SourceData file (w/o opening) which is stored at a location in d-drive and while pasting into another sheet (master file will have the sheets which are already created for the filtered values) it should replace the existing data in the defined range (A2:Z10).

Requirement description is as below:-

1. I have a file named as "RBD - <dd-mmm-yy>" stored at a particular location in D-Drive
2. In the master file, when I select a cell (say B2) and enter the date (in dd-mmm-yy format and is same as that of the sourcedata file name in point 1) and click the command button (Refresh) to refresh the data, macro should reach out to the stored file (sourcedata file in D-Drive) which is in the defined date format and read the contents, auto filter on column D (with filter value as Project Name) and copy the contents/rows related to that project (which are already created for those filter values) into the master file.
3. In this process, it should also replace the existing data in the rows of the sheet in master file.
4. If any New Filter Value is added in that SourceData sheet, then in that case, it should automatically create a new sheet with that Filtered value and copy the data as above.
5. Instead of point 2 where the macro should reach the file automatically having the date format, it would also work if it prompts me to browse and select the sourcedata file in my computer. Once the file is browsed and selected, it should not open, but instead, it should automatically filter, copy and paste the contents as mentioned above.

Please help me here in this regards....</dd-mmm-yy>
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

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