As the title states I need help with a copy and past VBA for a button I am using column a on sheet 2 "Data" and what I need is when I input an "X" into the column which there are multiple rows that will be used, I need when I push the button it copies the whole row to the bottom row of the "TruckHistory" sheet. But I want only the values copied over. I have tried so many too many to count variations of copy and paste code that I am at my wits end. The attached sheet is just a working model. There are a lot of blank cells in the data sheet and truck history, as I am continuing to update it everyday. Here is the code I have gathered so far.
Code
Private Sub History_Click()
Dim i As Long, lrow As Long
Application.ScreenUpdating = False
With Worksheets("Data")
lrow = .Range("A" & .Rows.Count).End(xlUp).Row
For i = 2 To lrow
If .Range("A" & i).Value = "X" Then .Rows(i).copy
Worksheets("TruckHistory").Range("A" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial = xlPasteValues
Next i
End With
MsgBox "Done"
Application.ScreenUpdating = True
End Sub[CODE]
Display More
[/CODE]