Hello,
Hi, how to copy data from one sheet to a table on an other sheet using macro records , i faced a problem when i click the button it's working good but if i try to add other data it's overwrite the first one(it doesn't copy the data on the next row).
thank you in advance
This is the code:
Sub Calculer()
'
' Calculer Macro
'
'
Range("D4").Select
Selection.Copy
Sheets("Recapitulatif").Select
Range("Table1[Date]").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(0, 1).Range("A1").Select
Sheets("Calculette").Select
Range("D7").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recapitulatif").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(0, 1).Range("A1").Select
Sheets("Calculette").Select
ActiveCell.Offset(4, 5).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recapitulatif").Select
Sheets("Calculette").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recapitulatif").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(0, 10).Range("A1").Select
Sheets("Calculette").Select
Range("I10").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("H9").Select
Selection.ClearContents
Range("H8").Select
Selection.ClearContents
Range("H7").Select
Selection.ClearContents
Range("H6").Select
Selection.ClearContents
Range("H5").Select
Selection.ClearContents
Range("D7").Select
Selection.ClearContents
Range("D4").Select
Selection.ClearContents
End Sub
Hi, how to copy data from one sheet to a table on an other sheet using macro records , i faced a problem when i click the button it's working good but if i try to add other data it's overwrite the first one(it doesn't copy the data on the next row).
thank you in advance
This is the code:
Sub Calculer()
'
' Calculer Macro
'
'
Range("D4").Select
Selection.Copy
Sheets("Recapitulatif").Select
Range("Table1[Date]").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(0, 1).Range("A1").Select
Sheets("Calculette").Select
Range("D7").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recapitulatif").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(0, 1).Range("A1").Select
Sheets("Calculette").Select
ActiveCell.Offset(4, 5).Range("A1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recapitulatif").Select
Sheets("Calculette").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Recapitulatif").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(0, 10).Range("A1").Select
Sheets("Calculette").Select
Range("I10").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("H9").Select
Selection.ClearContents
Range("H8").Select
Selection.ClearContents
Range("H7").Select
Selection.ClearContents
Range("H6").Select
Selection.ClearContents
Range("H5").Select
Selection.ClearContents
Range("D7").Select
Selection.ClearContents
Range("D4").Select
Selection.ClearContents
End Sub