Hello everybody!
I`m sorry for my english, it`s not my native language.
My problem is that one: I have an Excell database which contains Id`s in the first column and Names in the second. The aim is to create a new workbook per line which fiilename is "Id Name" and to copy the Id and the Name in the new workbook with reference to the original one (in case of changes in the original database) and to had it a structure that already exists.
I`ve already found how to create all the new workbook and save them with a "good" name butI don`t know how to continue:
![]()
Sub test() Dim newW As Workbook Application.ScreenUpdating = False For i = Sheets(1).Range("A50000").End(xlUp).Row To 1 Step -1 FName = Sheets(1).Cells(i, 1).Value & " " & Sheets(1).Cells(i, 2).Value & ".xls" Set newW = Workbooks.Add newW.SaveAs Filename:=FName Workbooks(FName).Close Next Application.ScreenUpdating = True End Sub 'create a button Private Sub CommandButton1_Click() test End Sub
Do you know if we can copy the structure everytime a workbook is created? and then insert the Id in A2 and the Name in B2?
Thanks
Bookmarks