OneTrueTony
New Member
- Joined
- Dec 9, 2020
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
I'll start with saying I've never messed with VBA and Macros.
My boss is looking to take a spreadsheet that breaks down the employees by manager, create new workbooks and save them by the managers name.
I've been able to take the managers by filtering and then create the new workbook but I'm getting stuck on auto naming and saving.
(Creates new workbook and opens it up)
Sub test()
Cells.Select
Range("B1").Activate
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveSheet.Name = ActiveSheet.Range("I1")
Range("b1").Select
End Sub
How would I go about editing the macro to then take the new workbook and save it (file name would be in L2)?
My boss is looking to take a spreadsheet that breaks down the employees by manager, create new workbooks and save them by the managers name.
I've been able to take the managers by filtering and then create the new workbook but I'm getting stuck on auto naming and saving.
(Creates new workbook and opens it up)
Sub test()
Cells.Select
Range("B1").Activate
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveSheet.Name = ActiveSheet.Range("I1")
Range("b1").Select
End Sub
How would I go about editing the macro to then take the new workbook and save it (file name would be in L2)?