bluepenink
Well-known Member
- Joined
- Dec 21, 2010
- Messages
- 585
Hello
Can someone pls help me with a macro to create new workbooks?
i want to save a workbook from cell N3 on worksheet called "Branch"
i want to path to be saved on desktop in a folder called "Bonus"
-the file name needs to be in the following way:
i.e.
Employee name from N3 THEN (vlookup on SE list for district) THEN V.1.0 THEN (today's date)
for example > save as >excel 03 > file name
John Doe (New York-Long Island) V.1.0 (Sep 6, 2011)
I have the district the person belongs to in the worksheet "SE List", so if you can pls help me with this macro that would be great, as there are over 100 employees i have to do this for in my main sheet. also, if you can define the name so if i expand teh selection, it would not throw off the macro.
pls and thx u so much!
the above macro is not working and nor is saving a file in a folder...can u pls help
Can someone pls help me with a macro to create new workbooks?
i want to save a workbook from cell N3 on worksheet called "Branch"
i want to path to be saved on desktop in a folder called "Bonus"
-the file name needs to be in the following way:
i.e.
Employee name from N3 THEN (vlookup on SE list for district) THEN V.1.0 THEN (today's date)
for example > save as >excel 03 > file name
John Doe (New York-Long Island) V.1.0 (Sep 6, 2011)
I have the district the person belongs to in the worksheet "SE List", so if you can pls help me with this macro that would be great, as there are over 100 employees i have to do this for in my main sheet. also, if you can define the name so if i expand teh selection, it would not throw off the macro.
pls and thx u so much!
Code:
Option Explicit
Sub SaveAsSpecial()
With ActiveWorkbook.Sheets("Bonus")
If .[N3] <> "" Then
ActiveWorkbook.SaveAs .[N3] & " (" & _
Application.VLookup(N3, Sheets("SE List").Range("C:E"), 3, 0) _
& ") V.1.0 (" & Format(Date, "MMM D, YYYY") & ").xls", xlNormal
End If
End With
End Sub
the above macro is not working and nor is saving a file in a folder...can u pls help
Last edited by a moderator: