I know a bit of VBA, however I got a problem, I am trying to write a code that will copy all data from 1 sheet, append/paste it into the next blank cell in sheet 2 and then remove the data from sheet 1. I am using below code, but I get cell values replaced by the word TRUE.

Sub Instal_Sum_Paste() ActiveWorkbook.Sheets("Vehicle working").Select Dim N As Long N = Cells(6, 2).End(xlDown).Row Set DT = Range("b6:G" & N) DT.Copy ActiveWorkbook.Sheets("Installation Summary").Select lMaxRows = Cells(Rows.Count, "B").End(xlUp).Row Range("B" & lMaxRows + 1).Select ActiveCell.Value = DT.PasteSpecial(xlPasteValues) ActiveWorkbook.Sheets("Vehicle working").Select DT.Select Selection.ClearContents MsgBox "done", vbOKOnly, "done" End Sub 
1

1 Answer

I managed to find an answer, its silly I know:

 Sub Instal_Sum_Paste() ActiveWorkbook.Sheets("Vehicle working").Select Dim N As Long N = Cells(6, 2).End(xlDown).Row Set DT = Range("b6:G" & N) DT.Select Selection.Copy ActiveWorkbook.Sheets("Installation Summary").Select lMaxRows = Cells(Rows.Count, "B").End(xlUp).Row Range("B" & lMaxRows + 1).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone ActiveWorkbook.Sheets("Vehicle working").Select DT.Select Selection.ClearContents MsgBox "done", vbOKOnly, "done" End Sub 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.