Hello,
I知 not certain how to word this, but here is my attempt:
I have a template in an excel worksheet that needs to be saved using a thousand plus plan names which are listed in another excel sheet under column c.
basically i want to run a macro that will pull the name out of column c (on the list worksheet) and repeatedly save the template file using the plan names listed in column c on the (list worksheet). So once all is complete, there will be a thousand plus files saved in a folder that will all have the template on them.
any advice on how to write a code to do that? (I知 using the developer tab/vba in excel)
-I知 very new to creating macros, so far i've only recorded macros, never written. (i've tweaked per book instructions and I知 still learning language etc). I think I need to add something called a loop to the macro text.
Try this
It assumes the names start in C1 and you want them saved in the same directory as your active sheet with the names.Sub SADS() Dim MyPath As String, MyRange As Range MyPath = ThisWorkbook.Path Set MyRange = Sheets(1).Range("C1", Range("C" & Rows.Count).End(xlUp)) For Each c in MyRange ThisWorkbook.SaveAs Filename:=MyPath & "\" & c.Value & ".xls" Next End Sub
However, I don't know if you want to save them as .xls so you probably need to change that.
Regards
John
I just read that it is in different workbooks. Only works from this workbook.
Last edited by jolivanes; 01-16-2011 at 11:07 PM. Reason: need new code
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks