Hello Sami,
If I have understood your post correctly, then you would like the following to happen:-
- If User "A" is inputting data into the Master sheet, then all the data inputted by User "A" is to be placed into an individual sheet named after this particular User (in this case, A).
- If User "B" is inputting data into the Master sheet, then all the data inputted by User "B" is to be placed into an individual sheet named after this particular User (in this case, B).
..............and so on for all Users.
I'm assuming that you want a whole data set (or block of data) to be transferred to the relevant individual sheet. If so, then the following code may do the task for you:-
Sub TransferUserData()
Application.ScreenUpdating = False
Dim lRow As Long
Dim MySheet As String
lRow = Range("A" & Rows.Count).End(xlUp).Row
If Range("B1") <> "" Then
MySheet = Range("B1")
Range("A3:M" & lRow).Copy
Sheets(MySheet).Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
End If
Sheets("Master").Range("A3:M" & Rows.Count).ClearContents
Application.ScreenUpdating = True
Application.CutCopyMode = False
MsgBox "Data transfer completed!", vbExclamation
Sheets(MySheet).Select
End Sub
The code requires that you place the User's name (the sheet needs to be named exactly the same) into cell B1 on the Master sheet. The "used" data block for each User will be cleared from the Master sheet once transferred.
I have attached my test sample work book for you to peruse here:-
https://www.dropbox.com/s/m54tr0x22hefi62/Sami%20Khan.xlsm?dl=0
I hope that this helps.
Cheerio,
vcoolio.