Work down a Ref list and Save as

evilkaz

New Member
Joined
Aug 18, 2011
Messages
5
Hi all

I made a Statement Generator that pulls data from various sources all i need to do is enter a reference. :)
I would like to know if there is a way to make a macro that will work down a list of references, inputting it into the statement generator. Then save the file as the reference and then move on to the next ref in the list.

Could someone point me in the right direction? :)

Thanks !
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try something like this on a copy of your data. Name the range of references you want to use and put that into the macro. Also enter the name of the workbook or use a cell value.
Code:
Sub GoThroughList ()
Dim cl As Range
For Each cl In Range("?????") ' you can enter a range.
[A5] = cl

'call your macro here

ActiveWorkbook.SaveAs Filename:="???"  & ".xls", FileFormat:= _
        xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
        , CreateBackup:=False
ActiveWorkbook.Close savechanges:=True
Next cl
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,710
Members
452,939
Latest member
WCrawford

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