Copying data directly to a specific sheet
Closed
                    
        
                    robsdyer
    
        
                    Posts
            
                
            1
                
                            Registration date
            Thursday April 23, 2015
                            Status
            Member
                            Last seen
            April 23, 2015
            
                -
                            Apr 23, 2015 at 07:40 AM
                        
vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Apr 23, 2015 at 07:24 PM
        vcoolio Posts 1411 Registration date Thursday July 24, 2014 Status Moderator Last seen September 6, 2024 - Apr 23, 2015 at 07:24 PM
        Related:         
- Copying data directly to a specific sheet
 - How to find specific words on a page - Guide
 - How to copy data from one excel sheet to another - Guide
 - How do i find a specific video on youtube - Guide
 - Sheet right to left in google sheet - Guide
 - Windows network commands cheat sheet - Guide
 
1 response
                
        
                    vcoolio
    
        
                    Posts
            
                
            1411
                
                            Registration date
            Thursday July 24, 2014
                            Status
            Moderator
                            Last seen
            September  6, 2024
            
            
                    262
    
    
                    
Apr 23, 2015 at 07:24 PM
    Apr 23, 2015 at 07:24 PM
                        
                    Hello Robsdyer,
I'm not sure how your work book is set out, but the following code may point you in the right direction:-
You can have a look at my test work book here:-
https://www.dropbox.com/s/qbxt3vbdspii2aw/Robsdyer.xlsm?dl=0
to see how the code works. The code assumes that the Employee names are in Column B. I'm not sure if you want to clear the Employee entries from the Summary sheet once the data has been transferred so, for now, the relevant line of code has been commented out (line 14 in the code).
You may need to adjust the ranges to suit yourself.
If its not quite what you need, then please upload a sample of your work book (be careful with any sensitive data) so we can see what you need.
You can upload a sample by using a free file sharing site such as DropBox or ge.tt.
Cheerio,
vcoolio.
            I'm not sure how your work book is set out, but the following code may point you in the right direction:-
Sub TransferEmployeeData()
Application.ScreenUpdating = False
Dim lRow As Long
Dim MySheet As String
lRow = Range("A" & Rows.Count).End(xlUp).Row
For Each cell In Range("B2:B" & lRow)
    MySheet = cell.Value
    cell.EntireRow.Copy Sheets(MySheet).Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
Next cell
'Sheets("Summary").Range("A2:J" & Rows.Count).ClearContents
MsgBox "Data transfer completed!", vbExclamation
Application.ScreenUpdating = True
End Sub
You can have a look at my test work book here:-
https://www.dropbox.com/s/qbxt3vbdspii2aw/Robsdyer.xlsm?dl=0
to see how the code works. The code assumes that the Employee names are in Column B. I'm not sure if you want to clear the Employee entries from the Summary sheet once the data has been transferred so, for now, the relevant line of code has been commented out (line 14 in the code).
You may need to adjust the ranges to suit yourself.
If its not quite what you need, then please upload a sample of your work book (be careful with any sensitive data) so we can see what you need.
You can upload a sample by using a free file sharing site such as DropBox or ge.tt.
Cheerio,
vcoolio.