Attendance append not working

roy00a4

New Member
Joined
Mar 15, 2016
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone,

Its been a while since my last visit. I have been working on the my VBA skills. I have a workbook with two sheets. I have written a code to append the data from one sheet to the other. But it is not working as desired. Any help or suggestion related to the issue is much appreciated.

Code:
Private Sub CommandButton1_Click()
Dim loLastRow As Long


Worksheets("Att_Entry").Range("C8:C107").Copy


With Worksheets("Template")
   loLastRow = .Cells(Rows.Count, 3).End(xlUp).Row + 1
   .Range("A" & loLastRow).PasteSpecial Paste:=xlPasteValues
End With


Worksheets("Att_Entry").Range("D8:D107").Copy


With Worksheets("Template")
   loLastRow = .Cells(Rows.Count, 3).End(xlUp).Row + 1
   .Range("B" & loLastRow).PasteSpecial Paste:=xlPasteValues
End With


Worksheets("Att_Entry").Range("E8:E107").Copy


With Worksheets("Template")
   loLastRow = .Cells(Rows.Count, 3).End(xlUp).Row + 1
   .Range("C" & loLastRow).PasteSpecial Paste:=xlPasteValues
End With


Worksheets("Att_Entry").Range("E3").Copy


With Worksheets("Template")
   loLastRow = .Cells(Rows.Count, 3).End(xlUp).Row + 1
   .Range("D" & loLastRow).PasteSpecial Paste:=xlPasteValues
End With


Worksheets("Att_Entry").Range("F8:F107").Copy


With Worksheets("Template")
   loLastRow = .Cells(Rows.Count, 3).End(xlUp).Row + 1
   .Range("E" & loLastRow).PasteSpecial Paste:=xlPasteValues
End With


Worksheets("Att_Entry").Range("G8:G107").Copy


With Worksheets("Template")
   loLastRow = .Cells(Rows.Count, 3).End(xlUp).Row + 1
   .Range("F" & loLastRow).PasteSpecial Paste:=xlPasteValues
End With


Worksheets("Att_Entry").Range("I3").Copy


With Worksheets("Template")
   loLastRow = .Cells(Rows.Count, 3).End(xlUp).Row + 1
   .Range("G" & loLastRow).PasteSpecial Paste:=xlPasteValues
End With


Worksheets("Att_Entry").Range("H7").Copy


With Worksheets("Template")
   loLastRow = .Cells(Rows.Count, 3).End(xlUp).Row + 1
   .Range("H" & loLastRow).PasteSpecial Paste:=xlPasteValues
End With


Worksheets("Att_Entry").Range("H8:H107").Copy


With Worksheets("Template")
   loLastRow = .Cells(Rows.Count, 3).End(xlUp).Row + 1
   .Range("I" & loLastRow).PasteSpecial Paste:=xlPasteValues
End With


MsgBox "Your Attendance Is Uploaded"


End Sub

[TABLE="width: 576"]
<colgroup><col span="9"></colgroup><tbody>[TR]
[TD="colspan: 5"]>>This is how I want the data to be pasted[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A ID[/TD]
[TD]Emp Code[/TD]
[TD]Name[/TD]
[TD]Current Supervisor[/TD]
[TD]Process[/TD]
[TD]Role[/TD]
[TD]Attendance Updated By[/TD]
[TD]Date[/TD]
[TD]Att[/TD]
[/TR]
[TR]
[TD]A134307[/TD]
[TD]889707[/TD]
[TD]Tseng Mei Fong[/TD]
[TD]Ferdinand Anthony[/TD]
[TD]Web Chat Lithium[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD]A135694[/TD]
[TD]1275595[/TD]
[TD]Tonmoy Mitra[/TD]
[TD][/TD]
[TD]Web Chat Lithium[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD]A127620[/TD]
[TD]911236[/TD]
[TD]Sunit Sinha[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD]A139656[/TD]
[TD]1226133[/TD]
[TD]Sugata Chatterjee[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD]A140143[/TD]
[TD]1394819[/TD]
[TD]Sudeepta Paul[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD]A130767[/TD]
[TD]1023977[/TD]
[TD]Subhadeep Das[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD]A135228[/TD]
[TD]864579[/TD]
[TD]Soumik Mallick[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]Trainer[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD]A130907[/TD]
[TD]725298[/TD]
[TD]Samrat Biswas[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]PC[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD]A130753[/TD]
[TD]1023651[/TD]
[TD]Roshni Saha[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD]A140142[/TD]
[TD]1391593[/TD]
[TD]Rajbir Singh[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD]A122047[/TD]
[TD]750883[/TD]
[TD]Puja Ghosh[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD]A139660[/TD]
[TD]1392558[/TD]
[TD]Prapti Khan[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD]A138581[/TD]
[TD]1368617[/TD]
[TD]Lipika Mahanandia[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD]A139094[/TD]
[TD]1386023[/TD]
[TD]Kakoli Mandal[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD]A136272[/TD]
[TD]1311031[/TD]
[TD]I****a Bhowmick[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD]A130752[/TD]
[TD]1023608[/TD]
[TD]Ishika Mondal[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD]A139659[/TD]
[TD]1392281[/TD]
[TD]Ila Singh[/TD]
[TD][/TD]
[TD]Web Chat Lithium[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD]A130761[/TD]
[TD]1023820[/TD]
[TD]Dipyaman Roy[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD]A401102[/TD]
[TD]482184[/TD]
[TD]Dibyendu Chakravorty[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD]A138580[/TD]
[TD]1364106[/TD]
[TD]Biswajit Dutta[/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 9"]>>This is how its coming .. Rest of it is way at the end almost[/TD]
[/TR]
[TR]
[TD]A ID[/TD]
[TD]Emp Code[/TD]
[TD]Name[/TD]
[TD]Current Supervisor[/TD]
[TD]Process[/TD]
[TD]Role[/TD]
[TD]Attendance Updated By[/TD]
[TD]Date[/TD]
[TD]Att[/TD]
[/TR]
[TR]
[TD]A134307[/TD]
[TD]889707[/TD]
[TD]Tseng Mei Fong[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A135694[/TD]
[TD]1275595[/TD]
[TD]Tonmoy Mitra[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A127620[/TD]
[TD]911236[/TD]
[TD]Sunit Sinha[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A139656[/TD]
[TD]1226133[/TD]
[TD]Sugata Chatterjee[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A140143[/TD]
[TD]1394819[/TD]
[TD]Sudeepta Paul[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A130767[/TD]
[TD]1023977[/TD]
[TD]Subhadeep Das[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A135228[/TD]
[TD]864579[/TD]
[TD]Soumik Mallick[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A130907[/TD]
[TD]725298[/TD]
[TD]Samrat Biswas[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A130753[/TD]
[TD]1023651[/TD]
[TD]Roshni Saha[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A140142[/TD]
[TD]1391593[/TD]
[TD]Rajbir Singh[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A122047[/TD]
[TD]750883[/TD]
[TD]Puja Ghosh[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A139660[/TD]
[TD]1392558[/TD]
[TD]Prapti Khan[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A138581[/TD]
[TD]1368617[/TD]
[TD]Lipika Mahanandia[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A139094[/TD]
[TD]1386023[/TD]
[TD]Kakoli Mandal[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A136272[/TD]
[TD]1311031[/TD]
[TD]I****a Bhowmick[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A130752[/TD]
[TD]1023608[/TD]
[TD]Ishika Mondal[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A139659[/TD]
[TD]1392281[/TD]
[TD]Ila Singh[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A130761[/TD]
[TD]1023820[/TD]
[TD]Dipyaman Roy[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A401102[/TD]
[TD]482184[/TD]
[TD]Dibyendu Chakravorty[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A138580[/TD]
[TD]1364106[/TD]
[TD]Biswajit Dutta[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/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][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Ferdinand Anthony[/TD]
[TD]Web Chat Lithium[/TD]
[TD]TM[/TD]
[TD]Abhishek Roy[/TD]
[TD]43230[/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Lithium[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]Trainer[/TD]
[TD][/TD]
[TD][/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]PC[/TD]
[TD][/TD]
[TD][/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PD[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Lithium[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PN[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Web Chat Billing 1[/TD]
[TD]TM[/TD]
[TD][/TD]
[TD][/TD]
[TD]PN[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
You showed us what you wanted the copied data to look like but you have not showed us what the source data looks like. That said, see if this gets you any closer to what you want.

Code:
Private Sub CommandButton1_Click()
    
    Dim att
    Dim loLastRow As Long


    att = Worksheets("Att_Entry").Range("C8:K107")
    With Worksheets("Template")
        loLastRow = .Cells(Rows.Count, 3).End(xlUp).Row + 1
        .Range("A" & loLastRow).Resize(UBound(att, 1), UBound(att, 2)) = att
        .Range("D" & loLastRow + 1 & ":D" & loLastRow + UBound(att) - 1).ClearContents
    End With


End Sub
 
Upvote 0
Hi igold

Thank you for your quick reply. My apologies for missing that.

Below is the sample form from where the data is sourced

[TABLE="width: 666"]
<colgroup><col><col><col><col><col><col><col span="2"></colgroup><tbody>[TR]
[TD="colspan: 2"]Attendance For[/TD]
[TD]Ferdinand Anthony[/TD]
[TD="colspan: 3"]Attendance Opened By[/TD]
[TD="colspan: 2"]Abhishek Roy[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A ID[/TD]
[TD]Emp Code[/TD]
[TD]Name[/TD]
[TD]Process[/TD]
[TD]Role[/TD]
[TD]10-May-18[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Tseng Mei Fong[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Tonmoy Mitra[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Sunit Sinha[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Sugata Chatterjee[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Sudeepta Paul[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Subhadeep Das[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Soumik Mallick[/TD]
[TD]Bill[/TD]
[TD]Trainer[/TD]
[TD]PD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Samrat Biswas[/TD]
[TD]Bill[/TD]
[TD]PC[/TD]
[TD]PD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Roshni Saha[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Rajbir Singh[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PD[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Puja Ghosh[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PN[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Prapti Khan[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PN[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Lipika Mahanandia[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PN[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Kakoli Mandal[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PN[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]I****a Bhowmick[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PN[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Ishika Mondal[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PN[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Ila Singh[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PN[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Dipyaman Roy[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PN[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Dibyendu Chakravorty[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PN[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1245[/TD]
[TD]1234567[/TD]
[TD]Biswajit Dutta[/TD]
[TD]Bill[/TD]
[TD]TM[/TD]
[TD]PN[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Hi,

Your source data and your destination data are different. In your source data under the "Process" heading you have "Bill", yet in the destination data, "Bill" has been converted to either "Web Chat Billing 1" or "Web Chat Lithium".

Also if you could provide me with Row and Column numbers of your source data it would be a little easier. I am pretty sure I have them figured out but a double check with what you have would be nice.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,195
Members
453,021
Latest member
pingpong7117

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top