C
Cimjet
Hi Everyone
I've got this macro for a summary sheet but it's pasting the formulas and
formating that I don't want.
I tried different things but no success.
----------------------------------------------
Sub SummaryPlus()
'Increment invoice number
Sheets("Facture").Range("K2").Value =
Sheets("Facture").Range("K2").Value + 1
ThisWorkbook.Save >>(This works OK)<<
'Date
Sheets("Facture").Range("B4") = Date >>(This works OK)<<
'Find the last row and copy/paste information from Facture worksheet
'Invoice Number
lastrow = Sheets("Summary").Cells(Cells.Rows.Count, "A").End(xlUp).Row
Sheets("Facture").Range("K2").Copy _
Destination:=Sheets("Summary").Range("A" & lastrow + 1)
'Customer Name
lastrow = Sheets("Summary").Cells(Cells.Rows.Count, "B").End(xlUp).Row
Sheets("Facture").Range("G1").Copy _
Destination:=Sheets("Summary").Range("B" & lastrow + 1)
'Address
lastrow = Sheets("Summary").Cells(Cells.Rows.Count, "C").End(xlUp).Row
Sheets("Facture").Range("G2").Copy _
Destination:=Sheets("Summary").Range("C" & lastrow + 1)
'Labor Cost
lastrow = Sheets("Summary").Cells(Cells.Rows.Count, "d").End(xlUp).Row
Sheets("Facture").Range("L37").Copy
Destination:=Sheets("Summary").Range("d" & lastrow + 1) >>(This does not works
OK)<<
End Sub
------------------------------------------------------------------
I tried this :>>lastrow = Sheets("Summary").Cells(Cells.Rows.Count,
"A").End(xlUp).Row
Sheets("Facture").Range("K2").Copy _
Destination:=Sheets("Summary").Range("A" & lastrow +
1).pastespecial _
paste:=xlpastevalues >>(It gives an error )
I tried this also :>>lastrow = Sheets("Summary").Cells(Cells.Rows.Count,
"A").End(xlUp).Row
Sheets("Facture").Range("K2").Copy _
Destination:=Sheets("Summary").Range("A" & lastrow +
1).value _
= workSheets("Facture").range("K2").value
I've got this macro for a summary sheet but it's pasting the formulas and
formating that I don't want.
I tried different things but no success.
----------------------------------------------
Sub SummaryPlus()
'Increment invoice number
Sheets("Facture").Range("K2").Value =
Sheets("Facture").Range("K2").Value + 1
ThisWorkbook.Save >>(This works OK)<<
'Date
Sheets("Facture").Range("B4") = Date >>(This works OK)<<
'Find the last row and copy/paste information from Facture worksheet
'Invoice Number
lastrow = Sheets("Summary").Cells(Cells.Rows.Count, "A").End(xlUp).Row
Sheets("Facture").Range("K2").Copy _
Destination:=Sheets("Summary").Range("A" & lastrow + 1)
'Customer Name
lastrow = Sheets("Summary").Cells(Cells.Rows.Count, "B").End(xlUp).Row
Sheets("Facture").Range("G1").Copy _
Destination:=Sheets("Summary").Range("B" & lastrow + 1)
'Address
lastrow = Sheets("Summary").Cells(Cells.Rows.Count, "C").End(xlUp).Row
Sheets("Facture").Range("G2").Copy _
Destination:=Sheets("Summary").Range("C" & lastrow + 1)
'Labor Cost
lastrow = Sheets("Summary").Cells(Cells.Rows.Count, "d").End(xlUp).Row
Sheets("Facture").Range("L37").Copy
Destination:=Sheets("Summary").Range("d" & lastrow + 1) >>(This does not works
OK)<<
End Sub
------------------------------------------------------------------
I tried this :>>lastrow = Sheets("Summary").Cells(Cells.Rows.Count,
"A").End(xlUp).Row
Sheets("Facture").Range("K2").Copy _
Destination:=Sheets("Summary").Range("A" & lastrow +
1).pastespecial _
paste:=xlpastevalues >>(It gives an error )
I tried this also :>>lastrow = Sheets("Summary").Cells(Cells.Rows.Count,
"A").End(xlUp).Row
Sheets("Facture").Range("K2").Copy _
Destination:=Sheets("Summary").Range("A" & lastrow +
1).value _
= workSheets("Facture").range("K2").value