Dropdown list (data validation) loop (select, refresh and save as)

Mcstefan

New Member
Joined
May 17, 2014
Messages
48
Hi,
I have a master file which has a dropdown list (cell A12 below) and I would like the macro to loop through all the items in the list one by one. After each selection, I need to refresh/retrieve data with F9, then create a new file, copy/paste the refreshed data into the new file and then return to the master file. And keep looping through the items in the drop down list until the last one. The names of the files that are created (Book4 below) could be the item name in the dropdown list (read it from cell A12). Here is the macro that I recorded, so it reflects pretty much what I am looking for. The only thing that I need is to put it into a loop that reads all the items from the dropdown list.
Any help is much appreciated.
Cristian.

1580588047078.png
 
Hi DanteAmor,
I have finally made it work by removing the Range and the parentheses - Application.Run "cc.F9"
Thank you very much for all your help
Cristian.
 
Upvote 0

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,487
Messages
6,125,075
Members
449,205
Latest member
Healthydogs

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